-
-
Notifications
You must be signed in to change notification settings - Fork 34.3k
Description
Version
24.12.0
Platform
Microsoft Windows NT 10.0.20348.0 x64
Subsystem
No response
What steps will reproduce the bug?
[not a core node.js issue, bit I figured it's worth sharing at least as a caveat and to help others recover]
I installed via the Windows MSI, which worked great by itself. But I also chose the option to install the VS Build Tools for C++, and that ended up messing up my system. The symptom was that attempting to do a .Net build in a 64-bit terminal would fail with:
The NuGetSdkResolver did not resolve this SDK because there was no version specified in the project or global.json
I didn't save the whole output, but the key hint from the remaining message was that it was looked for the .Net SDK under "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Sdks\Microsoft.NET.Sdk\Sdk", and I don't have such a path.
It turned out that the Build Tools for Visual Studio 2022 installer had put a bunch of x86 paths at the front of the system PATH, including "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin\amd64", and that resulted in either the wrong build of msbuild.exe running (in spite of that "amd64" at the end of the path) or wrong base path to search for SDKs.
Resolved by uninstalling the Build Tools for Visual Studio 2022.
How often does it reproduce? Is there a required condition?
Select the option to install the Build Tools for Visual Studio
What is the expected behavior? Why is that the expected behavior?
.
What do you see instead?
Broken .Net SDK resolving
Additional information
No response