概要 我需要引用新的所有元数据包Microsoft.AspNetCore.App版本2.1.0-rc1-final进行编译,但没有找到合适的运行时。
我尝试安装.net核心运行时2.1.0-rc1,但这安装了 .net核心运行时Microsoft。 NetCore .App并没有安装 aspnet 核心运行时Microsoft。 AspNetCore .App。我在哪里可以找到它或我需要什么设置? 将运行时框架设置为2.1.0预览版并不起作用: 2.1.0-preview2-最终
我试图让rc1在多个项目上运行,但我不明白为什么sdk安装中不存在运行时。 dotnet --info:
Host (useful for support):
Version: 2.2.0-preview1-26503-01
Commit: f6bf0a83c6
.NET Core SDKs installed:
2.1.200-preview-007474 [C:\Program Files\dotnet\sdk]
2.1.200-preview-007517 [C:\Program Files\dotnet\sdk]
2.1.200-preview-007576 [C:\Program Files\dotnet\sdk]
2.1.200-preview-007589 [C:\Program Files\dotnet\sdk]
2.1.200-preview-007597 [C:\Program Files\dotnet\sdk]
2.1.200 [C:\Program Files\dotnet\sdk]
2.1.300-preview2-008533 [C:\Program Files\dotnet\sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.1.0-preview2-final [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.0-preview2-final [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.0.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.0.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.0-preview2-26406-04 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.0-rc1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.2.0-preview1-26503-01 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download
在我的Csproj中:
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.1.0-rc1-final" />
</ItemGroup>
但是当我运行时,运行时不会接受我安装的任何运行时。是否兼容的运行时不包含在RC候选sdk中,如果没有,我可以强制它在另一个运行时运行。如果没有,其他人如何运行发布候选人?
C:\Users\stick>dotnet "C:\Users\stick\source\repos\Docs\aspnetcore\performance\caching\memory\sample\WebCache\bin\Debug\netcoreapp2.1\WebCache.dll"
It was not possible to find any compatible framework version
The specified framework 'Microsoft.AspNetCore.All', version '2.1.0-rc1-final' 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-preview2-final at [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
答案 0 :(得分:3)
您是否已将Visual Studio更新至15.7.1版?我在更新到2.1.0-rc1-final后运行asp核心应用程序时遇到问题,我也安装了最新的sdk,但输出是:
dotnet.exe' has exited with code -2147450730
解决方案是更新Visual Studio,现在一切正常。
更新:现在我知道,您还没有安装适当的SDK和运行时来运行此版本。您必须安装.NET Core 2.1 RC1 SDK和最新的运行时。