1. 安装VSCodium或者Code-OSS,OmniSharp报错
[ERROR] Error: spawn /home/pi/.vscode-server/extensions/ms-vscode.csharp-1.21.10/.omnisharp/1.34.10/run ENOENT
原因是因为官方没有发布VS Code的ARM版本,所以OmniSharp暂时不支持ARM,只支持远程调试(Remote Debugging)
2. dotnet build编译报错
error MSB6006: "csc.dll" exited with code 139.
原因:.NET Core 2.2的ARM版本Bug,微软官方已经不再支持.NET Core 2.2,请使用.NET Core 3.x
3. 安装EFCore Tool失败
dotnet tool install --global dotnet-ef
执行报错,
The settings file in the tool's NuGet package is invalid: Failed to retrieve tool configuration: Could not find file '/root/.dotnet/tools/.store/dotnet-ef/3.1.2/project.assets.json'.
Tool 'dotnet-ef' failed to install. Contact the tool author for assistance.
暂时的解决办法:
dotnet new tool-manifest
dotnet tool install dotnet-ef
然后就可以
dotnet ef migrations add Initial
dotnet ef database update
4. EFCore连接MySQL/MariaDB报错
Method 'get_Info' in type 'MySql.Data.EntityFrameworkCore.Infraestructure.MySQLOptionsExtension' from assembly 'MySql.Data.EntityFrameworkCore, Version=8.0.19.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' does not have an implementation.
MySql.Data.EntityFramework只支持到.NET Core 2.x。
.NET Core 3.x请使用Pomelo.EntityFrameworkCore.MySql。
5. dotnet ef database update报错
需要先手工创建一下这个表
CREATE TABLE IF NOT EXISTS `__EFMigrationsHistory` (
`MigrationId` varchar(95) NOT NULL,
`ProductVersion` varchar(32) NOT NULL,
CONSTRAINT `PK___EFMigrationsHistory` PRIMARY KEY (`MigrationId`));
6....