Reputation: 757
we use the global.json to specify the SDK version for our projects:
{
"sdk": {
"version": "3.1.200",
"rollForward": "latestFeature"
}
}
I had installed VS2019 16.7.6 and the following SDKs:
C:\WINDOWS\system32>dotnet --list-sdks
2.1.4 [C:\Program Files\dotnet\sdk]
2.1.100 [C:\Program Files\dotnet\sdk]
2.1.202 [C:\Program Files\dotnet\sdk]
2.1.504 [C:\Program Files\dotnet\sdk]
2.1.807 [C:\Program Files\dotnet\sdk]
2.1.808 [C:\Program Files\dotnet\sdk]
2.1.809 [C:\Program Files\dotnet\sdk]
2.1.810 [C:\Program Files\dotnet\sdk]
2.1.811 [C:\Program Files\dotnet\sdk]
3.1.109 [C:\Program Files\dotnet\sdk]
3.1.403 [C:\Program Files\dotnet\sdk]
Today I upgraded to VS2019 16.8.0 and now the following SDKs are installed:
C:\WINDOWS\system32>dotnet --list-sdks
2.1.4 [C:\Program Files\dotnet\sdk]
2.1.100 [C:\Program Files\dotnet\sdk]
2.1.202 [C:\Program Files\dotnet\sdk]
2.1.504 [C:\Program Files\dotnet\sdk]
2.1.807 [C:\Program Files\dotnet\sdk]
2.1.808 [C:\Program Files\dotnet\sdk]
2.1.809 [C:\Program Files\dotnet\sdk]
2.1.810 [C:\Program Files\dotnet\sdk]
2.1.811 [C:\Program Files\dotnet\sdk]
3.1.109 [C:\Program Files\dotnet\sdk]
5.0.100 [C:\Program Files\dotnet\sdk]
So the update removed the SDK 3.1.403 and as a result I now get a compile error, because the global.json requests 3.1.200 (with rollForward to latest feature)
So my question is:
edit I found that these sites give an overview of which SDK version came with which VS Update
https://dotnet.microsoft.com/download/dotnet/5.0
https://dotnet.microsoft.com/download/dotnet-core/3.1
https://dotnet.microsoft.com/download/dotnet-core/2.1
Upvotes: 1
Views: 504
Reputation: 5213
I just dealt with the same problem (also affects .NET Core 2.1 SDKs). I just installed the latest 3.1 SDK and 2.1 SDK, then updated my global.json files to use those versions. Everything worked fine after that
Upvotes: 3