How to setup SDK version into .NET Core project when global.json is not enough?

前端 未结 2 1215
既然无缘
既然无缘 2021-02-14 06:11

I found, from several sources, that the official way to setup SDK version into our .NET Core project is to add a global.json file into the project main folder.

By the way

相关标签:
2条回答
  • 2021-02-14 06:34

    Add

    <RuntimeFrameworkVersion>2.2.3</RuntimeFrameworkVersion>
    

    to your .csproj.

    Take a look at this question and this one for more information.

    0 讨论(0)
  • 2021-02-14 06:36

    If someone comes across this while not getting a .NET Core 3.0 project to open, make sure you have updated Visual Studio to the latest version. This fixed it for me when given the error below:

    C:\Program Files\dotnet\sdk\2.2.402\Sdks\Microsoft.NET.Sdk.WindowsDesktop\Sdk not found. 
    Check that a recent enough .NET Core SDK is installed and/or increase the version specified in global.json.
    
    0 讨论(0)
提交回复
热议问题