-
Notifications
You must be signed in to change notification settings - Fork 685
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 #2876
Comments
@Arsmn1996 Can you try installing .Net Core Build Tools as described here |
This is happening to me as well with 3.0 preview2 .NET Core SDK for OSX...
dotnet info output:
However if I uninstall it and use the 2.1 SDK that I have installed works fine. cc: @rainersigwald @DustinCampbell @nguerrera is this a SDK/CLI issue? |
@safern Thank you for that log! We can see hostfxr picking the 3.0 SDK and then the resolver rejects it. This is what I think is happening:
I don't know the exact details on what determines which MSBuild and resolver that is used by Omnisharp. I think it probes for mono but also includes its own as a fallback? @rchande @DustinCampbell can you confirm? |
To confirm a piece of your theory, indeed MSBuild version that comes with Omnisharp is 15.0: |
At a minimum we need to put a 15.9+ resolver there. This would make 2.1.302 be used in repro above as it is latest compatible. But we also need a path to msbuild 16 in omnisharp so folks can actually use 3.0. These should probably be tracked as separate issues. |
@nguerrera I am not very clear on the resolver you are talking about here. Can you please eleborate on what are the changes that are needed in omnisharp ? |
@nguerrera Awesome, thanks for the analysis! |
@akshita31 Looks like @rchande is on top of it, but the resolver in question is Microsoft.DotNet.MSBuildSdkResolver.dll described here: #2604 (comment) and implemented here: https://github.com/dotnet/cli/tree/master/src/Microsoft.DotNet.MSBuildSdkResolver |
I confirm that the SDK version 2.2.202 has conflict with OmniSharp, tried to install Mono, set the environment variables,.. but no result. |
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: |
I can confirm on my ubuntu 18.04 that version 2.2.202 causes issues with OmniSharp a downgrade to 2.2.105 "fixed" it so far.
|
@rchande This would be the same issue that causes problems for 3.0. 2.2.2xx also requires msbuild 16. |
Ditto for 2.1.6xx |
confirm that pinning dotnet core version to 2.2.105 fixes the issue. sudo apt-get install dotnet-sdk-2.2=2.2.105-1 |
Same here, works with 2.2.105-1 |
Same here, works fine with 2.2.105-1 Thank you @nhactung for the suggestion |
Many thanks for the suggestion to downgrade.
Worked me for as well on Linux Mint 19.1 |
Let me know when omnisharp supports these new version 😀 |
Latest OmniSharp beta as of now is Did this by setting |
Confirmed that downgraded worked with suggestions above. |
This worked for me without any other workarounds or downgrading, thank you |
Many thanks for @nhactung for the suggestion and @digital-abyss for the command. Confirmed that the following worked on Ubuntu 18.04 LTS:
|
Thanks @anarsen |
Can confirm that with the latest omnisharp version and 2.2.203 all is working fine (ubuntu 18.04) |
ubuntu 18.10 |
So when is the Marketplace getting updated with the latest release? |
Hello, I have the same issue and have following installed:
I understand from the comments above the latest vs-code C# extension(1.18.1??) should fix the issue. Was just wondering what is the ETA on it's release to VS-Code marketplace.
Thanks |
This helped me on Fedora 29, looks like it worked for other on Ubuntu: OmniSharp/omnisharp-roslyn#1394 (comment) |
I solved it by installing .Net Core Build Tools on Windows. |
Omnisharp 1.19.0 is now in the VS Marketplace by updating the extension in VS Code to the latest version. |
I'm having this issue with Omnisharp 1.19.0 (ms-vscode.csharp-1.19.0) Runtime Environment: Host (useful for support): If I pin my .NET core version to 2.2.104 it works fine, but when it tries to use 2.2.203 I get the "Microsoft.Build.Exceptions.InvalidProjectFileException: The SDK 'Microsoft.NET.Sdk.Web' specified could not be found." error |
assuming you already installed latest version and installed another version of dotnet you can specify sdk used in project through adding global.json
change have added
i ended up to stick with 2.2.1 version for the time being |
I believe the original issue in this bug is fixed with 1.19.0 so I'm going to close this. |
for those interested -#3023 |
I have the same problem |
As explained in my answer here: https://stackoverflow.com/a/60482521/190476 you could get this error in VS 2019 as well when you're missing the ".NET Core cross-platform development" workload |
I got the same issue in Ubuntu 20.04 and dotnet 3.1. Runtime Environment: Host (useful for support): .NET Core SDKs installed: .NET Core runtimes installed: |
@trandev Try the workaround for Snap installs outlined here https://github.com/OmniSharp/omnisharp-vscode/wiki/Troubleshooting:-'The-.NET-Core-SDK-cannot-be-located.'-errors#linux-snap-instructions |
I found that the issue came from installing dotnet-sdk via snap. I tried to uninstall dotnet-sdk and re-install via apt install. Then I need to update DOTNET_ROOT. Thanks @JoeRobich |
i updated dotnet sdk to 3.1.401 and i have the same problem |
@liodali The latest pre-release 1.23.0 build - https://github.com/OmniSharp/omnisharp-vscode/releases/tag/v1.23.0 - has better support for the new SDKs. If you are on a Mono platform be sure to use the included version of Mono by setting "useGlobalMono" to "never" otherwise it will use your system install of Mono which may still be incompatible. |
ah ok, for now i just downgrade the version of sdk to 3.1.201 |
I'm at SDK: 3.1.402, MSBuild: 16.8.0, omniSharp 1.23.2. I am not using global mono and yet having the same problem. I realize that the issue has been closed. Where would I look for the right solution in my case? |
@dsimanis Sorry you are running into issues. Please open a new issue and provide your OmniSharp Log and other information. Your situation may be different than others and we can only really know when we have that information. |
Although this is old, just wanted to comment that this also worked for me, in case anyone else finds this like I did. |
Environment data
dotnet --info
output:VS Code version:
C# Extension version:
Steps to reproduce
Output
The text was updated successfully, but these errors were encountered: