Omnisharp-vscode: OmniSharp throws when 'dotnet --info' process does not launch properly

Created on 31 May 2017  路  12Comments  路  Source: OmniSharp/omnisharp-vscode

Hey guys!

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

Please, help!

Bug Resolved-Fixed

All 12 comments

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.

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

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?

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

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

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.

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

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

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

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

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.

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

olfek picture olfek  路  3Comments

mshinnie picture mshinnie  路  3Comments

nguillermin picture nguillermin  路  3Comments

mattwoberts picture mattwoberts  路  3Comments

tstivers1990 picture tstivers1990  路  3Comments