错误 'Microsoft.NETCore.App', version '3.1.2' was not found. 临时解决的办法
1 dotnet ef migrations add InitialCBB
出现错误如下:
It was not possible to find any compatible framework version The framework 'Microsoft.NETCore.App', version '3.1.2' was not found.
- The following frameworks were found:
2.1.9 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
2.1.11 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
2.1.12 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
2.1.15 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
2.2.5 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
3.0.0-preview7-27912-14 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
3.1.1 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
You can resolve the problem by installing the specified framework and/or SDK.
The specified framework can be found at:
- https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=3.1.2&arch=x64&rid=win10-x64
临时解决问题的办法:
1 dotnet tool uninstall --global dotnet-ef 2 dotnet tool install --global dotnet-ef --version 3.1.1