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 2480
攒了一身酷
攒了一身酷 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:32

    Check to make sure you don't have global.json file in your project root folder that forces your project to use .NET SDK 2.1 only.

    If you have this global.json file, delete it, and then restart visual studio.

    As embarrassing as it might sound, I spent almost an hour tinkering and I even downloaded several SDK version to force it to use 2.2

提交回复
热议问题