The SDK 'Microsoft.NET.Sdk.Web' specified could not be found in VSCode OmniSharp extension

arsmn picture arsmn · Feb 26, 2019 · Viewed 10.5k times · Source

I've installed dotnet core 3 sdk and OmniSharp 1.18 extension on VSCode but OmniSharp has an error: Microsoft.Build.Exceptions.InvalidProjectFileException: The SDK 'Microsoft.NET.Sdk.Web' specified could not be found.

Answer

Sang Au picture Sang Au · Mar 8, 2019

Try the workaround solution bellow:

Add a file called omnisharp.json to your project folder with following content

{
    "MsBuild": {
        "UseLegacySdkResolver": true
    }
}

Then restart the Visual Studio Code