.NET Core 3 rc1 到最终升级:Visual Studio 2019 中缺失
.NET Core 3 rc1 to final upgrade: missing from Visual Studio 2019
我刚刚将 .NET Core 3 RC1 升级到最终版本(两天前发布),然后,当我刚刚升级它时,我可以构建项目,一切都很好。 dotnet
命令显示 3.0.100 版本是活动 SDK。
然后,我离开了几个小时,当我回到 VS2019 社区工作时,它不再有效,我根本无法再构建项目。我收到了消息:
The current .NET SDK does not support targeting .NET Core 3.0.
我的头发都快撕裂了!!!如果我从命令行尝试,我也会遇到问题:
Solution file error MSB4249: Unable to build website project "demo1". The ASP.NET compiler is only available on the .NET Framework version of MSBuild.
dotnet --version
显示:3.0.100
dotnet --list-sdks
最后一行显示:3.0.100 [C:\Program Files\dotnet\sdk]
那么为什么 3 RC1 只是工作,升级;在职的;然后。噗,不工作?试过修复、卸载、重装(Net Core 3 SDK),无果。
编辑: 正如我在评论中所建议的,这里是 Visual Studio 2019 版本,问题可重现:16.2.5。我认为这是问题的关键,我没有说出口。
适用于 release version of .NET Core 3 is Visual Studio 2019 16.3 的 Visual Studio 版本。
至于错误本身,估计是老Visual Studio注册的MSBuild环境变量引起的。 VS 和 .NET Core SDK 有它们的工具集副本,将它们混在一起会导致此类问题。 .NET Core 3.0 RC1 的发布是为了避免在最后的 VS 和 SDK 预览之间使用不同的工具。正如博客所解释的那样:
For technical and historical reasons, the .NET toolset (compilers, NuGet client, MSBuild, …) is duplicated between Visual Studio and the .NET Core SDK. Important changes were made in the toolset as part of Visual Studio 2019 16.3 Preview 4, also released today. It is critical that the .NET Core SDK version that is part of any Visual Studio release includes the same toolset in order to deliver a compatible experience in all scenarios.
我刚刚将 .NET Core 3 RC1 升级到最终版本(两天前发布),然后,当我刚刚升级它时,我可以构建项目,一切都很好。 dotnet
命令显示 3.0.100 版本是活动 SDK。
然后,我离开了几个小时,当我回到 VS2019 社区工作时,它不再有效,我根本无法再构建项目。我收到了消息:
The current .NET SDK does not support targeting .NET Core 3.0.
我的头发都快撕裂了!!!如果我从命令行尝试,我也会遇到问题:
Solution file error MSB4249: Unable to build website project "demo1". The ASP.NET compiler is only available on the .NET Framework version of MSBuild.
dotnet --version
显示:3.0.100
dotnet --list-sdks
最后一行显示:3.0.100 [C:\Program Files\dotnet\sdk]
那么为什么 3 RC1 只是工作,升级;在职的;然后。噗,不工作?试过修复、卸载、重装(Net Core 3 SDK),无果。
编辑: 正如我在评论中所建议的,这里是 Visual Studio 2019 版本,问题可重现:16.2.5。我认为这是问题的关键,我没有说出口。
适用于 release version of .NET Core 3 is Visual Studio 2019 16.3 的 Visual Studio 版本。
至于错误本身,估计是老Visual Studio注册的MSBuild环境变量引起的。 VS 和 .NET Core SDK 有它们的工具集副本,将它们混在一起会导致此类问题。 .NET Core 3.0 RC1 的发布是为了避免在最后的 VS 和 SDK 预览之间使用不同的工具。正如博客所解释的那样:
For technical and historical reasons, the .NET toolset (compilers, NuGet client, MSBuild, …) is duplicated between Visual Studio and the .NET Core SDK. Important changes were made in the toolset as part of Visual Studio 2019 16.3 Preview 4, also released today. It is critical that the .NET Core SDK version that is part of any Visual Studio release includes the same toolset in order to deliver a compatible experience in all scenarios.