获取"NETSDK1045当前的.NET SDK不支持将.NET Core 3.0作为目标".使用Blazor Asp.NetCore托管模板时 [英] Getting "NETSDK1045 The current .NET SDK does not support .NET Core 3.0 as a target" when using Blazor Asp.NetCore hosted template
问题描述
我已经安装了.NetCore 3.0的预览版并尝试在Visual Studio 2019中运行blazor模板Blazor (ASP.NET Core hosted)
:
I've installed the preview of .NetCore 3.0 and tried to run the blazor template Blazor (ASP.NET Core hosted)
in Visual Studio 2019:
发生的错误如下:
NETSDK1045当前的.NET SDK不支持将.NET Core 3.0作为目标.目标.NET Core 2.2或更低版本,或者使用支持.NET Core 3.0的.NET SDK版本.
NETSDK1045 The current .NET SDK does not support .NET Core 3.0 as a target. Either target .NET Core 2.2 or lower, or use a .NET SDK version that supports .NET Core 3.0.
推荐答案
在 https://github.com/dotnet/cli/issues/8743#issuecomment-371519751 ,我设法通过在x64版本之外安装x86版本的.NET Core 3.0来解决此问题.重新启动Visual Studio(2019)后,该版本即可正常工作.
Following the comment under https://github.com/dotnet/cli/issues/8743#issuecomment-371519751, I managed to resolve the problem by installing the x86 version of the .NET Core 3.0 additionally to the x64 version. The build worked after restarting Visual Studio (2019).
这篇关于获取"NETSDK1045当前的.NET SDK不支持将.NET Core 3.0作为目标".使用Blazor Asp.NetCore托管模板时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!