dotnet / dotnet/project-system

Visual Studio should show the same information as the command-line when an SDK isn't found

Open
#2,467 9 comments 3 reactions 1 assignee Claimed by @davkean View on GitHub
Feature-Error-List Triage-Approved
Dominant language
C#
Stars
1k
Forks
415
PR merge metrics
No merged PRs in 30d

Description

From the command-line when I attempt to build a project where the SDK isn't found, I see:

```
Build started 06/20/17 10:24:22 AM.
The specified SDK version [2.0.0-preview1-005977] from global.json [C:\Temp\aspnetcore-app-workshop\global.json] not found; install specified SDK version
C:\Temp\aspnetcore-app-workshop\src\BackEnd\BackEnd.csproj : 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.
Project "C:\Temp\aspnetcore-app-workshop\src\BackEnd\BackEnd.csproj" on node 1 (default targets).
C:\Temp\aspnetcore-app-workshop\src\BackEnd\BackEnd.csproj : error MSB4236: The SDK 'Microsoft.NET.Sdk.Web' specified could not be found.
Done Building Project "C:\Temp\aspnetcore-app-workshop\src\BackEnd\BackEnd.csproj" (default targets) -- FAILED.

Build FAILED.

C:\Temp\aspnetcore-app-workshop\src\BackEnd\BackEnd.csproj : 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.

"C:\Temp\aspnetcore-app-workshop\src\BackEnd\BackEnd.csproj" (default target) (1) ->
C:\Temp\aspnetcore-app-workshop\src\BackEnd\BackEnd.csproj : error MSB4236: The SDK 'Microsoft.NET.Sdk.Web' specified
could not be found.

0 Warning(s)
2 Error(s)

Time Elapsed 00:00:00.04
```

Inside VS, the project is unloaded and if I attempt to load it, I see:

```
C:\Temp\aspnetcore-app-workshop\src\BackEnd\BackEnd.csproj : error : The SDK 'Microsoft.NET.Sdk.Web' specified could not be found. C:\Temp\aspnetcore-app-workshop\src\BackEnd\BackEnd.csproj
```

It's missing all the other information about global.json being involved here - I thought my install was busted, but turns out my global.json was specifying a version that wasn't installed.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.