Updating Visual Studio 2022 from 17.7 to 17.8 prevents building projects .NET 7

2.5k views Asked by At

Why after I've updated Visual Studio 2022 from 17.7 to 17.8 projects targeting .NET 7 fail to build with message: Unable to resolve the .NET SDK version as specified in the global.json located at .\global.json

Has VS 2022 17.8 removed .NET 7 SDK?

Why on .NET SDK download page it says Using Visual Studio? This release is only compatible with Visual Studio 2022 (v17.7). ?

How can I build .NET 7 projects on VS 2022 17.8?

4

There are 4 answers

2
plykkegaard On

I haven't update to latest VS 2022 17.8 But with each update the PATH settings get messed and the 64 bit gets moved to the end of the path list with 32-bit path above This results in the NET SDK can't be found

Move the 64 bit path above the 32 bit path

Move the 64 bit path above the 32 bit path

[EDIT] The above issue with the path been send to the end of the seems to have been solved
I you have issues with unable to build project or solution, please open project properties and close Looks like some initial settings is missing right after the 17.8 update?

Anyways my NET 7 project rebuilds just fine after the open/close operation

0
Philippe On

The SDK needs to be reinstalled.

Download here: https://dotnet.microsoft.com/en-us/download/visual-studio-sdks

We just ran into the same problem. It looks like this is by design. Although I found no reference to the behaviour. The Visual Studio Updater seems to uninstall old SDKs it installed itself, keeping only the most recent version. As it did not remove 7.0.404 for me, which I installed myself, but it removed 7.0.401, which I did not. So if you have not installed it yourself you are only left with 8.0.100. At least this is the behaviour I witnessed on other systems.

So did others: https://developercommunity.visualstudio.com/t/Installintg-Visutal-Studio-178-removed/10521824?sort=newest

0
Alexey Tanchenko On

I had the same issue after updating. Make sure the .NET SDK 7 is installed on your PC – in PowerShell, run the dotnet --list-sdks command.

Probably, it was uninstalled somehow during updates. So, I just re-installed it and everything is fine now.

0
Kirit Shah On

My case I use VS 2022 17.7.7 and dotnet core 3.1 November 2023 its pop up to update and I updated then my existing project can not run it shows

HTTP Error 500.30 - ANCM In-Process Start Failure

above solution one " 64 bit path above the 32 bit path " can not works because i do not have 32 bit path.

I follow second solution "it was uninstalled somehow during updates. ". I show that now vs 17.7.7 can not download from any site. I just INSTALL all SDK 5.0, 6, 7, 8. I restart my PC and run project clean then build. now it works as original previous way. Thanks to plykkegaard , Adrian Mole, and Alexey Tanchenko.