question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

Environment data

dotnet --info output:

.NET Core SDK (reflecting any global.json): Version: 3.0.100-preview-010184 Commit: c57bde4593

Runtime Environment: OS Name: Windows OS Version: 10.0.17134 OS Platform: Windows RID: win10-x64 Base Path: C:\Program Files\dotnet\sdk\3.0.100-preview-010184\

Host (useful for support): Version: 3.0.0-preview-27324-5 Commit: 63a01b08e5

.NET Core SDKs installed: 3.0.100-preview-010184 [C:\Program Files\dotnet\sdk]

.NET Core runtimes installed: Microsoft.AspNetCore.All 2.1.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.App 2.1.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 3.0.0-preview-19075-0444 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 2.1.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 3.0.0-preview-27324-5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.WindowsDesktop.App 3.0.0-preview-27325-3 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

VS Code version:

Version: 1.31.1 (user setup) Commit: 1b8e8302e405050205e69b59abb3559592bb9e60 Date: 2019-02-12T02:20:54.427Z Electron: 3.1.2 Chrome: 66.0.3359.181 Node.js: 10.2.0 V8: 6.6.346.32 OS: Windows_NT x64 10.0.17134

C# Extension version:

1.18.0-beta7

Steps to reproduce

  1. Install latest dotnet core version: 3.0.100-preview-010184
  2. Install latest C# extension release: 1.18.0-beta7
  3. Create new dotnet webapi project
  4. Launch VSCode

Output

Microsoft.Build.Exceptions.InvalidProjectFileException: The SDK ‘Microsoft.NET.Sdk.Web’ specified could not be found. c:\Users\Alireza\Documents\Test\core3\core3.csproj at Microsoft.Build.Shared.ProjectErrorUtilities.ThrowInvalidProject(String errorSubCategoryResourceName, IElementLocation elementLocation, String resourceName, Object[] args) at Microsoft.Build.Evaluation.Evaluator4.ExpandAndLoadImportsFromUnescapedImportExpressionConditioned(String directoryOfImportingFile, ProjectImportElement importElement, List1& projects, Boolean throwOnFileNotExistsError) at Microsoft.Build.Evaluation.Evaluator4.ExpandAndLoadImports(String directoryOfImportingFile, ProjectImportElement importElement) at Microsoft.Build.Evaluation.Evaluator4.EvaluateImportElement(String directoryOfImportingFile, ProjectImportElement importElement) at Microsoft.Build.Evaluation.Evaluator4.PerformDepthFirstPass(ProjectRootElement currentProjectOrImport) at Microsoft.Build.Evaluation.Evaluator4.Evaluate(ILoggingService loggingService, BuildEventContext buildEventContext) at Microsoft.Build.Evaluation.Project.Reevaluate(ILoggingService loggingServiceForEvaluation, ProjectLoadSettings loadSettings) at Microsoft.Build.Evaluation.Project.ReevaluateIfNecessary(ILoggingService loggingServiceForEvaluation, ProjectLoadSettings loadSettings) at Microsoft.Build.Evaluation.Project.Initialize(IDictionary2 globalProperties, String toolsVersion, String subToolsetVersion, ProjectLoadSettings loadSettings) at Microsoft.Build.Evaluation.Project..ctor(String projectFile, IDictionary2 globalProperties, String toolsVersion, String subToolsetVersion, ProjectCollection projectCollection, ProjectLoadSettings loadSettings) at Microsoft.Build.Evaluation.ProjectCollection.LoadProject(String fileName, IDictionary2 globalProperties, String toolsVersion) at OmniSharp.MSBuild.ProjectLoader.EvaluateProjectFileCore(String filePath) at OmniSharp.MSBuild.ProjectLoader.BuildProject(String filePath) at OmniSharp.MSBuild.ProjectFile.ProjectFileInfo.Load(String filePath, ProjectLoader loader) at OmniSharp.MSBuild.ProjectManager.LoadOrReloadProject(String projectFilePath, Func1 loader)

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:45 (5 by maintainers)

github_iconTop GitHub Comments

23reactions
anarsencommented, Apr 11, 2019

Latest OmniSharp beta as of now is 3.5.0-beta.2204 which seem to work with the latest .NET Core SDK.

Did this by setting "omnisharp.path": "latest" in VS Code’s setting.json.

9reactions
digital-abysscommented, Apr 7, 2019

I had this same problem with dotnet 2.1.602 – downgrading to 2.1.500 worked for me as well. Thanks @nhactung for the suggestion!

For those on linux mint or ubuntu: sudo apt-get install dotnet-sdk-2.1=2.1.500-1

Read more comments on GitHub >

github_iconTop Results From Across the Web

The SDK 'Microsoft.NET.Sdk.Web' specified could not be found
1 Answer · 1.Clean-up obsolete .NET Core versions: Go to Control Panel and uninstall previous . · 2.Create a Global.json file: Add a...
Read more >
.net core - Visual studio 2017 Update 3 - The SDK 'Microsoft ...
Net.Sdk.Web' specified could not be found, and leaving me unable to open the project in Visual Studio. The problem was the project was...
Read more >
Weird error MSB4236: The SDK 'Microsoft.NET.Sdk.Web ...
Sdk.Web' specified could not be found. When I build the project with CLI dotnet build whatever project I try to build (all .csproj...
Read more >
The SDK 'Microsoft.Net.Sdk.Web' specified could not be found
This article describes how to fix "The SDK 'Microsoft.Net.Sdk.Web' specified could not be found" when creating ASP.NET Core 2.0 projects in ...
Read more >
The SDK 'Microsoft.NET.Sdk.Web' specified could not be found
Updated to VS2017.3. Opening solution with couple of exe -projects (netcoreapp1.1). None of exe projects will load, getting error "The SDK 'Microsoft.NET.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found