1

I have Visual Studio 2019 16.8.3 installed (upgrading from 16.8.2).

After the upgrade, I could not open any .NET Core related project, as I had the following error:

The project file cannot be opened. Unable to locate the .NET SDK. Check that it is installed and that the version specified in global.json (if any) matches the installed version.

So I decided to install the .Net Core 3.1 SDK and .Net 5 SDK separately.

After the successful install, I still don't have any SDK installed.

enter image description here

enter image description here

enter image description here

What should I do about this (other than VS full repair)?

1

1 Answer 1

11

According to this very good article, x64 and x86 versions of the SDK can't be active the same time:

The problem here is that if you have both 32 bit and 64 bit versions of the SDK installed, the first one found wins. And only one version of the SDK (32 bit or 64 bit) can be active at any one time.

It seems that Windows and Visual Studio choose SDK version by throwing a dice which one is found first...

SO, I solved it by moving the x64 directory a level up in the PATH environment variable and now everything works 🤦

enter image description here

3
  • Saved me, thank you for posting! Nov 9, 2021 at 19:33
  • @ScottScowden Glad I could help :)
    – Nestor
    Nov 10, 2021 at 16:51
  • believe it or not. what solved for me was adding the final backslash... please remember the final backslash \
    – dgolive
    Dec 28, 2021 at 0:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.