Skip to content

Commit 7a496ec

Browse files
huysentruitwdougbu
authored andcommitted
Add common error 'Unable to locate the .NET Core SDK' to Build.Errors.md and BuildFromSource.md (closes #3035)
1 parent 69feac2 commit 7a496ec

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

docs/BuildErrors.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,12 @@ Similar to BUILD001, but this error is not suppressable. This error only appears
2222
2323
This repo uses a common output directory (artifacts/bin/$(ProjectName) and artifacts/obj/$(ProjectName)). To avoid confllicts in build output, each
2424
project file should have a unique name.
25+
26+
### Error MSB4236 / Unable to locate the .NET Core SDK
27+
28+
Executing `.\restore.cmd` or `.\build.cmd` may produce these errors:
29+
30+
> error : Unable to locate the .NET Core SDK. Check that it is installed and that the version specified in global.json (if any) matches the installed version.
31+
> error MSB4236: The SDK 'Microsoft.NET.Sdk' specified could not be found.
32+
33+
In most cases, this is because the option _Use previews of the .NET Core SDK_ in VS2019 is not checked. Start Visual Studio, go to _Tools > Options_ and check _Use previews of the .NET Core SDK_ under _Environment > Preview Features_.

docs/BuildFromSource.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,15 @@ The cause of this problem is that the solution you are using does not include th
9696
dotnet sln add C:\src\AspNetCore\src\Hosting\Abstractions\src\Microsoft.AspNetCore.Hosting.Abstractions.csproj
9797
```
9898
99+
### Common error: Unable to locate the .NET Core SDK
100+
101+
Executing `.\restore.cmd` or `.\build.cmd` may produce these errors:
102+
103+
> error : Unable to locate the .NET Core SDK. Check that it is installed and that the version specified in global.json (if any) matches the installed version.
104+
> error MSB4236: The SDK 'Microsoft.NET.Sdk' specified could not be found.
105+
106+
In most cases, this is because the option _Use previews of the .NET Core SDK_ in VS2019 is not checked. Start Visual Studio, go to _Tools > Options_ and check _Use previews of the .NET Core SDK_ under _Environment > Preview Features_.
107+
99108
## Building with Visual Studio Code
100109
101110
Using Visual Studio Code with this repo requires setting environment variables on command line first.

0 commit comments

Comments
 (0)