Skip to content
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

OmniSharp throws when 'dotnet --info' process does not launch properly #1532

Closed
tihoho opened this issue May 31, 2017 · 12 comments
Closed

OmniSharp throws when 'dotnet --info' process does not launch properly #1532

tihoho opened this issue May 31, 2017 · 12 comments
Assignees
Milestone

Comments

@tihoho
Copy link

tihoho commented May 31, 2017

Hey guys!

I have a bug in .sln file loading proccess:
https://forum.unity3d.com/threads/visual-code-unity-integrated-failed.473301/

Please, help!

@DustinCampbell
Copy link
Member

Could you provide your OmniSharp Log from that forum post? Note that the error in that screenshot doesn't show a problem with the solution file.

@tihoho
Copy link
Author

tihoho commented May 31, 2017

Dustin, thanks for a feedback.
https://gist.github.com/tihoho/a0ce3f0af6238ddbe7f9d3f7c9a249cb
in link 3 files: Omni log, .sln file, and .csproj

@DustinCampbell
Copy link
Member

OK. I've got a suspicion of what's happening. Could you run dotnet --info at the command line and let me know what the output is?

@tihoho
Copy link
Author

tihoho commented May 31, 2017

image
translate: Error in running application (0x...). For exit press OK.

:(
i have win7 x64, and install dotnet for x64

@DustinCampbell
Copy link
Member

Thanks! After looking through the OmniSharp source code, I expected something like that. The issue is that OmniSharp executes dotnet --info to retrieve some information that it uses to support .NET Core projects. However, that code is a bit permissive if the process fails to launch properly. When that happens, it simply carries on with empty data, which ultimately threw an exception.

tl;dr: Your project and solution are fine. The problem is with dotnet on your machine. You might be able to fix the issue by installing a new version of the .NET Core SDK. In the meantime, I'll work on hardening this code path in OmniSharp.

@DustinCampbell DustinCampbell added this to the 1.11 milestone May 31, 2017
@DustinCampbell DustinCampbell self-assigned this May 31, 2017
@DustinCampbell DustinCampbell changed the title .sln file header error OmniSharp throws when 'dotnet --info' process does not launch properly May 31, 2017
@tihoho
Copy link
Author

tihoho commented May 31, 2017

Dustin, thanks so much! Then I went to reinstall dotnet and other dependent libraries. If it's not difficult for you, skip the link on the SDK, because I'm confused in the abundance of Microsoft products

@DustinCampbell
Copy link
Member

Here's a link: https://www.microsoft.com/net/download/core

@tihoho
Copy link
Author

tihoho commented May 31, 2017

Unfortunately it did not help me. The dotnet still runs with the same error :(

@DustinCampbell
Copy link
Member

Perhaps try uninstalling the .NET Core SDK from Add/Remove Programs and see if your project loads in VS Code with it removed?

@gregg-miskelly
Copy link
Contributor

gregg-miskelly commented May 31, 2017

You might also try doing the same with the Visual C++ 2015 Redistributable.

@tihoho
Copy link
Author

tihoho commented May 31, 2017

Dustin, his is unbeliveble, but remove Code SDK helped me, now the Omnisharp has earned as it should. Thank you again for all your help! I am suffering with this for the second day.

@DustinCampbell
Copy link
Member

Excellent! I'm glad that helped workaround the issue. @gregg-miskelly's solution might also have helped the .NET Core SDK to run properly as well, which would have worked around the issue. I have a fix for the OmniSharp server that will be in PR shortly which will make it more resilient to this issue in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants