Error Knowledge Base .NET MSB4236

MSB4236: The specified SDK could not be found

MSBuild could not resolve the project SDK, such as Microsoft.NET.Sdk, because the required .NET SDK or SDK resolver is unavailable.

What Broke in the Build

MSBuild could not resolve the project SDK, such as Microsoft.NET.Sdk, because the required .NET SDK or SDK resolver is unavailable.

Fix the underlying build failure

Confirm SDK availability with dotnet --info, install the required SDK, or update global.json, then rerun dotnet build, and if you are using msbuild.exe directly, prefer dotnet build or ensure the MSBuild instance supports SDK-style projects.

Prove the Build Path Is Clean

Build succeeds without MSB4236.

Logs show the intended SDK version and resolver path.

Validation

Re-run the failing command and confirm the original code/message is gone, and confirm expected artifacts or outputs exist (packages restored, build/publish succeeds).

Why the Build Fails

Usually this comes down to the .NET SDK is not installed, or the wrong MSBuild instance is being used, global.json pins an SDK that isn’t installed, or SDK resolution fails due to feed or network problems.

Typical Output

error MSB4236: The SDK 'Microsoft.NET.Sdk' specified could not be found.

Mechanism

This is the part worth understanding if the quick fix did not hold. It explains what .NET is trying to do at the moment the error appears.

SDK-style projects declare <Project Sdk="...">.

MSBuild uses SDK resolvers, including the installed .NET SDK and NuGet-delivered SDKs, if resolution fails, MSB4236 is emitted.

Keep Build Prerequisites Consistent

To prevent this, standardize CI builds on dotnet build, and pin SDK versions intentionally and ensure CI installs them explicitly.

Need help or found a mistake? Contact RepoFlow support for questions.

Join our mailing list