-
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
vscode c# / omnisharp not starting after updating to 1.13.0 #1846
Comments
The error that you're getting still indicates that the global.json says 2.0.0:
Could you change that global.json to specify 2.0.2, save it, restart VS Code, and let me know what the OmniSharp Log reads in that case? |
Edit: Thanks for the help! I updated the issue to show I already tried that :( unfortunately it did not fix the issue. I've just tried again (madness / don't trust myself) and getting:
It looks like it just isn't finding any SDK I guess. Very strange! |
That is strange. I would expect the SdkResolver installed with OmniSharp to locate the SDK you have installed, especially if it's on the path. Could you try updating the version of Mono you have installed? 4.8.0 is a bit old and installing a recent version will cause OmniSharp to use the MSBuild installed with Mono. |
Yep that has fixed it..still saying it can't find the SDK but omnisharp seems to be working as usual.
|
Those SDK messages are really weird. I assume "dotnet" is on your path? |
Yes it is...very weird :( |
Do you see those same
@nguerrera, @livarcocc: Have you seen anything like this? We're getting these |
I get the same thing running that command but the solution does build. I'm using this to try and log the output
For some reason I can see the SDK text in the console but it doesn't appear in MyLog.log so I can't send you an example that shows it. |
FYI, I have the same issue on a Windows environment. Used to work on the same machine a couple of days ago. |
Thanks @TomPallister : that verifies my suspicion. Out of curiosity have you done anything different with your .NET Core SDK installation? I'm trying to figure out if there's anything I'll need to do on my macOS to replicate the issue. I assume https://github.com/TomPallister/Ocelot is the project to use? @yreynhout : Is it truly the same issue? Do you have a |
@DustinCampbell I haven't done anything different to my knowledge...I am an idiot tho :( |
@TomPallister : I just tried the following steps and could not replicate the SDK message. Here's what I did: First, I removed all of the .NET Core SDKs from my system.
Next, I downloaded .NET Core SDK 2.0.2 from https://www.microsoft.com/net/download/macos and ran the installer. I verified that I have just .NET Core SDK 2.0.2 on the system.
Next, I cloned the Ocelot project.
Next, I double-checked that the
I tried building Ocelot with the
Since I got an error with the build script, I went ahead and restored and build with the SDK.
Both of those operations succeeded, so I went ahead and opened the project in VS Code:
Everything appears to have loaded successfully:
|
@DustinCampbell I did specify a global.json after observing the issue but doesn't solve it. Oddly, on my Ubuntu environment 1.13.0 is running just fine. I'll post the windows error log tomorrow and try some of the above. |
thanks! |
@DustinCampbell I will give your instructions a try and see what happens thanks! |
@TomPallister : If you still see the SDK issue, try the following at a command prompt:
This should enable a bunch of diagnostic spew in the OmniSharp Log as it tries to resolve you .NET Core SDK. This might provide some insight. |
@yreynhout I've got a similar issue on my Windows environment. I also had Visual Studio 2017 installed while primarily using Visual Studio Code for my .NET core project, but updating Visual Studio solved my issues with the C# extension. Just saying, in case you might have a similar setup. |
A workaround while this issue is being fixed:
|
@cboutiette : FWIW, v1.11.0 is not the last stable version. The last stable release should be https://github.com/OmniSharp/omnisharp-vscode/releases/tag/v1.12.1. |
Additionally, rolling back to an earlier C# for VS Code may break certain C# features with VS Code 1.18. For example, unit test debugging will likely be broken due to an API break that was introduced in VS Code 1.18 which C# for VS Code 1.13 addresses. |
@DustinCampbell Upon testing everything seemed to work for me as it did prior to the update. I haven't tried version 1.12.1 but I am sure it will work the same. Honestly, as a developer who prefers vscode over visual studio this is more of a temporary fix and not a permanent one. So do at your own risk. Bottom line is it kept me chugging along and maybe it could help some others. My VSCode version is 1.18 in case anyone is wondering as well. |
Edited: updated this with a newer release of OmniSharp that will work with C# for VS 1.13. Another potential workaround that would allow you to stay on C# for VS 1.13 until the next version comes out would be to use a newer version of OmniSharp which fixes already contains a fix for the issue.
|
@DustinCampbell all seems OK after removing old versions of .net core! Thanks for the help. |
Hi, sorry to be a pain I've been trying to work this out but don't know enough about the software! I expect this is something that I'm doing wrong.
Environment data
dotnet --info
output:VS Code version: 1.17.2 (1.17.2)
C# Extension version: 1.13.0
Steps to reproduce
global.json:
and I also tried..
global.json:
Expected behavior
I don't know what the Output is normally but I guess vscode c# extension starts up as usual and omnisharp kicks in.
Actual behavior
Stack trace from vscode Output below:
The text was updated successfully, but these errors were encountered: