The current .NET SDK does not support targeting .NET Core 2.1. Either target .NET Core 2.0 or lower, or use a .NET SDK that supports .NET Core 2.1

后端 未结 15 2402
攒了一身酷
攒了一身酷 2020-12-13 23:13

have tried upgrading to the professional version of visual studio 2017 v 15.6.0 (Preview 7.0)

and installed aspnetcore-runtime-2.1.0-preview1-final-win-x64 and .net

相关标签:
15条回答
  • 2020-12-13 23:47

    Stopping IIS for publishing solved the problem. But first I needed to install net core 2.1 SDK and update the Visual Studio.

    0 讨论(0)
  • 2020-12-13 23:50

    This happened to me after installing 2.2.100-preview3-009430 and then updating to Visual Studio 15.9.2.

    I resolved by enabling the "Use previews of the .NET Core SDK" option.

    1. Go to: Tools > Options > Projects and Solutions > .NET Core

    2. Check the "Use previews of the .NET Core SDK" box

    3. Restart Visual Studio and rebuild the solution.

    VS Preview Options

    0 讨论(0)
  • 2020-12-13 23:51

    I had the .Net Core SDK 2.1.4 installed and followed the other answers in this post without solving my problem. What finally did it for me was installing .Net Core SDK version 2.1.301, and uninstalling every other version. Seems like the SDK 2.1.4 cannot target .Net Core 2.1 but SDK 2.1.301 does the job.

    0 讨论(0)
提交回复
热议问题