Search code examples
.net-corevisual-studio-2017

Visual studio 2017 Update 3 - The SDK 'Microsoft.NET.Sdk.Web' specified could not be found


Error:

C:\WebApp\WebApp.csproj : error : The SDK 'Microsoft.NET.Sdk.Web' specified could not be found. C:\WebApp\WebApp.csproj

I am trying to open Dotnet core project and I am getting the above error.

I have installed the latest SDK from https://www.microsoft.com/net/core#windowscmd

I have checked the path for dotnet cmd and it works fine.

Am I missing something? Let me know if you need more information.

The target framework is set to .NET 4.5.2


Solution

  • As suggested in the comment, I updated global.json file as shown below

    {
      "sdk": {
      "version": "1.0.0"
     } 
    }
    

    Also, I had to remove the <ItemGroup> which contains wwwroot files path in .csproj file.

    enter image description here

    Reload the project and it works like a charm!