MSB4236: The SDK 'name' specified could not be found

This error occurs when an MSBuild project SDK couldn't be loaded. An MSBuild project SDK is a packaged set of imported files that sets up common build configuration for a build of a certain kind. For example, for .NET builds, the .NET SDK is used. See How to use MSBuild project SDKs.

To diagnose the error, first look in the project file's top-level Project element (MSBuild) to see what SDK is being used. Examples include the .NET SDK (Microsoft.NET.Sdk) and the ASP.NET SDK (Microsoft.NET.Sdk.Web). MSBuild project SDKs can be delivered NuGet packages.

<Project Sdk="Microsoft.NET.Sdk.Web">

The .NET SDK shouldn't fail to load, unless global.json points to an SDK that isn't installed. Look for the version specified in the version property of the sdk object in global.json:

  "sdk": {
    "version": "2.2.200"

The NuGet SDK resolver can fail in the case of a network error or incorrect NuGet feed.

Check the top-level element in the project file to see whether an SDK version was specified, and make sure that version is installed. You can specify the version in the project file by using the following syntax:

<Project Sdk="My.Custom.Sdk/1.0.0" />

MSBuild project SDK versions can also be specified in global.json.