Skip to main content

The SDK ‘Microsoft.NET.Sdk.Web’ specified could not be found

If you are working on Visual Studio 2017 with update 3, then you might have come across the error 'The SDK ‘Microsoft.NET.Sdk.Web’ specified could not be found' in netcoreapp1.1 for both web and console.

Unfortunately, I also landed up into this situation. So, one straight forward and temporary solution could be to edit the project file manually from Project Sdk = ”Microsoft.NET.Sdk.Web” to Project Sdk = ”Microsoft.NET.Sdk” and re-open the solution. Everything will work fine as expected. So, what are the reasons behind this error?

I explored many articles on MSDN forums as well as looked at github link and the primary reasons which are causing this error are:
  • Workstation is still holding an old preview version of CLI 1.0
  • Installed CLI version is correct but its path is incorrect.

Solution:
  • Uninstall all the older versions of CLI with 1.x as SDKs with version 1.x can break things
  • Verify the value of PATH- Open the developer command prompt and verify the value of the PATH variable and make sure that 'C:\\Program Files\\dotnet' appears on the path before any other entries that point to subdirectories of the dotnet folder.

If you are working with the web project, then you can also verify the SDK versions in global.json file and edit it manually if required.

Hope above post was useful for the newbies who just took Update 3 and are struggling to build their solution templates.

Comments