安装了 .Net Core 最新的 SDK 但获取“框架 'Microsoft.AspNetCore.App'”,找不到版本“2.1.0”

.Net Core lastest SDK installed but getting 'Framework 'Microsoft.AspNetCore.App', version '2.1.0' was not found

我想在 linux 上使用 .Net Core 并且有最新版本:

> sudo pacman -Qs dotnet
local/dotnet-host 2.1.0-1
    A generic driver for the .NET Core Command Line Interface
local/dotnet-runtime 2.1.0-1
    The .NET Core runtime
local/dotnet-sdk 2.1.300-1
    The .NET Core SDK
> dotnet --version
2.1.300

但是当我想 运行 我的示例应用程序(只是剃须刀模板)时:

> dotnet run  
Using launch settings from /home/user/src/WebRepTrack/Properties/launchSettings.json...
It was not possible to find any compatible framework version
The specified framework 'Microsoft.AspNetCore.App', version '2.1.0' was not found.
  - Check application dependencies and target a framework version installed at:
      /opt/dotnet/
  - Installing .NET Core prerequisites might help resolve this problem:
      http://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409
  - The .NET Core framework and SDK can be installed from:
      https://aka.ms/dotnet-download

查看 ,问题是用户没有安装合适的 sdk/runtime 版本,但这不是我的问题的原因,不是吗?

编辑:在查看 github 上的 dotnet-core 存储库后,我意识到 MS 现在随包 aspnetcore-运行time-2.1 提供 asp.net 核心支持。 0(而之前,它是随 core-运行time 一起提供的)。 ArchLinux 软件包 dotnet-runtime 包含此更改!详情请看这里:
https://bugs.archlinux.org/task/58806

查看 github 上的 dotnet-core 存储库后,我意识到 MS 现在随 package aspnetcore-runtime-2.1.0 (whereas before, it was shipped with the core-runtime). The ArchLinux package dotnet-runtime does not include this change! See here 提供 asp.net 核心支持以获取更多详细信息: