-
Notifications
You must be signed in to change notification settings - Fork 676
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The SDK 'Microsoft.NET.Sdk.Web' specified could not be found. #3023
Comments
I believe it is preferring (1) over (2). @rchande is there a way to control which msbuild instance is selected? If not, you'd need to uninstall VS 2017 or install VS 2019, I guess. |
Also, it's confusing that (2) is described as StandAlone 15.0 instead of StandAlone 16.0. |
at the moment it's unfortunately hardcoded https://github.com/OmniSharp/omnisharp-roslyn/blob/6836fadb9c35a88d4695276d14302336a460b841/src/OmniSharp.Host/MSBuild/Discovery/MSBuildLocator.cs#L44-L50
that is also currently hardcoded |
I think @akshita31 filed a bug for us to track enabling a choice? |
Solved this problem by adding
|
@themindfulcoder Do you mean that file should be added to the project directory? |
So I have used a combination of items related to this issue. Not all of them are necessary to fix my issue but I will detail it anyway. I added the {
"MsBuild": {
"UseLegacySdkResolver": true
}
} I have a {
"sdk": {
"version": "2.2.300"
}
} I added omnishart settings to {
"omnisharp.path": "latest",
"omnisharp.useGlobalMono": "never"
} I added an environment variable.
The projectI used the Once adding all of these items, the extension started to function. I started to undo what I added to see what was the real solution. The My Solution
|
@steveoh Thanks a lot dude! |
@nguerrera @rchande I proposed a change to how we score msbuild here OmniSharp/omnisharp-roslyn#1545 |
@James-Lester No. According to this page of Omnisharp wiki, the file |
the original issue reported here has been resolved as VS2017 msbuild is no longer going to be picked up. |
In
|
Was asked to create new issue on #2876
Environment data
dotnet --info
output:PS C:\source\poc\omnisharp-issue> dotnet --info
.NET Core SDK (reflecting any global.json):
Version: 2.2.203
Commit: e5bab63eca
Runtime Environment:
OS Name: Windows
OS Version: 10.0.14393
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\2.2.203\
Host (useful for support):
Version: 2.2.4
Commit: f95848e524
.NET Core SDKs installed:
1.0.0 [C:\Program Files\dotnet\sdk]
1.0.1 [C:\Program Files\dotnet\sdk]
1.0.4 [C:\Program Files\dotnet\sdk]
2.0.0 [C:\Program Files\dotnet\sdk]
2.0.2 [C:\Program Files\dotnet\sdk]
2.1.4 [C:\Program Files\dotnet\sdk]
2.1.300 [C:\Program Files\dotnet\sdk]
2.1.302 [C:\Program Files\dotnet\sdk]
2.2.104 [C:\Program Files\dotnet\sdk]
2.2.203 [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.All 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.2.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.2.4 [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 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.2.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.2.4 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 1.0.4 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 1.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 1.1.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 1.1.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.2.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.2.4 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download
VS Code version:
1.33.1
C# Extension version:
ms-vscode.csharp-1.19.0.omnisharp\1.32.18
Steps to reproduce
Created a new .NET Core project based on 2.2.203
Repo that gives me issue - https://github.com/tonyranieri/omnisharp-poc
Expected behavior
I don't get the exception and the project loads.
Actual behavior
Exception when loading, no OmniSharp functionality.
Error Log
If I pin the version to 2.2.104 via the global.json and reload VS Code it works as expected.
The text was updated successfully, but these errors were encountered: