Ubuntu 20.04出现问题。我遵循official instruction并安装了SDK和运行时。如果可以从终端确认:
dotnet --list-sdks
3.1.403 [/usr/share/dotnet/sdk]
和运行时:
dotnet --list-runtimes
Microsoft.AspNetCore.App 3.1.9 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.1.9 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
...但是我正在尝试的项目dotnet run
需要Microsoft.AspNetCore.App 2.2.8
,如从日志中可以看到的那样:
It was not possible to find any compatible framework version
The framework 'Microsoft.AspNetCore.App', version '2.2.8' was not found.
- The following frameworks were found:
3.1.9 at [/usr/share/dotnet/shared/Microsoft.AspNetCore.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.AspNetCore.App&framework_version=2.2.8&arch=x64&rid=ubuntu.20.04-x64
安装缺少的SDK和运行时的正确方法是什么?
答案 0 :(得分:0)
因此,上述运行时不支持Ubuntu 20.04
,因此必须手动安装它们。
在我的特定情况下,to download binaries就足够了,并像往常一样运行它们。