无法在Windows Server 2016上运行.NET Core 2.1(.1)应用程序

Rop*_*tah 12 windows-server-2016 asp.net-core asp.net-core-2.1

我正在尝试在Windows Server 2016实例上运行.NET Core应用程序.它在我的Windows 10机器上构建/运行良好.

首先,我正在做dotnet publish,我将发布的网站复制到Windows Server实例.我按照本指南安装了主机软件包以及最新的SDK(2.1.3).

但是当我尝试dotnet myapp.dll收到以下错误消息时:

It was not possible to find any compatible framework version
The specified framework 'Microsoft.AspNetCore.All', version '2.1.1' was not found.
  - Check application dependencies and target a framework version installed at:
      C:\Program Files\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
  - The following versions are installed:
      2.1.0 at [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Run Code Online (Sandbox Code Playgroud)

我可以清楚地看到,确实Microsoft.AspNetCore.All只有一个2.1.0版本Program Files\dotnet\shared.我如何获得正确的2.1.1版本?

任何指导都非常感谢.