我正在尝试在我的Windows Server 2016实例上运行.NET Core应用程序。在我的Windows 10机器上,它可以正常构建/运行。
首先,我执行dotnet publish
,然后将发布的站点复制到Windows Server实例。我遵循了此指南并安装了hosting bundle和最新的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]
我清楚地看到,确实只有一个版本为2.1.0的Microsoft.AspNetCore.All位于Program Files\dotnet\shared中。我该如何获取正确的2.1.1版本?感谢任何指导。
dotnet publish --self-contained
发布吗? - DavidGrefs/heads/release/2.1.3xx
上的.NET SDK,我从中获取了301
版本。MSFT网站显示了2.1.300
的.NET SDK... - Ropstah