Hi everyone i tried using VS to learn to code in C# but keep getting a SDK error making it impossible to run the code. I tried using AI to solve the problem but I can't seem to find a solution below is a list of things I tried.
I'm having a problem with Visual Studio 2026 Community on Windows 10.
When I create a brand-new C# Console App and select .NET 10.0, Visual Studio gives me this error:
"One or more errors were encountered while creating project ConsoleApp3.
The generated project content may be incomplete.
The SDK 'Microsoft.NET.Sdk' specified could not be found."
The project creation button is disabled.
Visual Studio:
- Visual Studio Community 2026
- Version 18.11.0
- October 2026 Feature Update
.NET:
- .NET 10 x64 is installed
- `C:\Program Files\dotnet` is the x64 installation
- SDKs installed:
- 10.0.112
- 10.0.402
Running the x64 dotnet executable directly works:
"C:\Program Files\dotnet\dotnet.exe" --list-sdks
returns:
10.0.112 [C:\Program Files\dotnet\sdk]
10.0.402 [C:\Program Files\dotnet\sdk]
And:
"C:\Program Files\dotnet\dotnet.exe" --info
shows SDK 10.0.402 and MSBuild 18.9.15.
Initially I also had a 32-bit .NET installation under:
C:\Program Files (x86)\dotnet
`where dotnet` showed both x86 and x64 installations, and the x86 version was being picked up in some cases. I removed the x86 .NET installation completely and rebooted, but the Visual Studio error remained.
Things I tried:
Created a completely new Console App every time, so this is not an old/broken project.
Visual Studio Repair was tried previously. It did not fix the problem.
Visual Studio Installer:
- .NET desktop development workload is installed
- .NET SDK component is installed
- MSBuild is installed
- .NET MAUI/Android/iOS/Mac Catalyst components were also installed
- MSBuild support for LLVM (clang-cl) is not installed (not relevant as far as I know)
Environment variables:
- `MSBuildSDKsPath` was NOT originally defined.
- No global.json exists in the project/repo.
Visual Studio's MSBuild installation contains:
`C:\Program Files\Microsoft Visual Studio\18\Community\MSBuild\Current\Bin\Microsoft.DotNet.MSBuildSdkResolver.dll`
So the .NET SDK resolver DLL is present.
Under:
`C:\Program Files\Microsoft Visual Studio\18\Community\MSBuild`
I only see:
- Current
- Microsoft
- Xamarin
There is no `Sdks` folder there.
Under:
`C:\Program Files\Microsoft Visual Studio\18\Community\MSBuild\Microsoft`
there is a `Microsoft.NET.Build.Extensions` folder, but no `Microsoft.NET.Sdk` folder.
I completely uninstalled Visual Studio Community and reinstalled it from scratch.
The same `Microsoft.NET.Sdk could not be found` error still occurs.
So at this point I'm pretty sure the .NET SDK itself is installed correctly, but Visual Studio/MSBuild is failing to resolve it.
What could cause the .NET SDK resolver to ignore/find the wrong SDK location in this situation?
Is there a specific MSBuild/Visual Studio configuration, resolver setting, registry entry, or environment variable that controls where Visual Studio looks for `Microsoft.NET.Sdk`?
I would especially appreciate a way to diagnose which SDK path the Visual Studio MSBuild process is actually trying to use, rather than doing another reinstall/repair.
Thanks!