Question Details

No question body available.

Tags

.net-9.0 .net-10.0 visual-studio-2026

Answers (2)

December 10, 2025 Score: 3 Rep: 434 Quality: Low Completeness: 10%

With Microsoft's help, I have the answer. Apparently, the DOTNETHOSTPATH environment variable was the problem. Not sure how that got there, but removing it and all the other DOTNET_HOST environment variables got the build working. MS said the variable must point to the actual dotnet.exe file, not a folder. By removing it, Visual Studio figured it out on its own.

February 9, 2026 Score: 2 Rep: 81 Quality: Low Completeness: 10%

I my case I could not build with target .net10.0 and didn't see the drop down box in Visual Studio 2026, because I had a global.json lying around that limited the SDK to 9.0.0.
After I changed the global.json everything worked.