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 2502
攒了一身酷
攒了一身酷 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:40

    I also solved the problem in this way:

    Check versions on dotnet sdk available

    C:\Users\me>dotnet --list-sdks
    
     ##2.1.202 [C:\Program Files\dotnet\sdk]
     ##2.1.505 [C:\Program Files\dotnet\sdk]
     ##2.1.508 [C:\Program Files\dotnet\sdk]
     ##2.1.509 [C:\Program Files\dotnet\sdk]
     ##2.1.511 [C:\Program Files\dotnet\sdk]
     ##2.1.514 [C:\Program Files\dotnet\sdk]
     ##2.1.801 [C:\Program Files\dotnet\sdk]
    
    

    I tested my build on all of those versions and it does not work until I uninstalled all of the above from Programs and Features. Then download from the latest:

    https://dotnet.microsoft.com/download/dotnet-core/thank-you/sdk-3.1.300-windows-x64-installer
    

    This worked. Dont waste time like i did just install latest version of dotnet sdk and you good to go. "

提交回复
热议问题