Omnisharp-vscode: Cannot Start Omnisharp [ERROR] Error: spawn cmd ENOENT

Created on 9 Feb 2016  路  17Comments  路  Source: OmniSharp/omnisharp-vscode

Moved from microsoft/vscode#2841
From @sorab2142

Trying to open a Unity3d solution (sln). One that works fine on another machine with VSCode but does'nt start on another.

Resolved-Not Reproducible

Most helpful comment

I had this problem using Windows 10 and solved it by adding "C:\Windows\System32\" in the PATH variable.

All 17 comments

I have the same error when I open a C# file. I'm not using Unity3d, it's just my web application.

@sorab2142, @trenoid: Are either of you still experiencing this problem with the C# Extension for VS Code? This issue is pretty stale, so I'm going to go ahead and close it, but please let me know if you're still experiencing this problem.

@DustinCampbell yes this problem still persists. Is there something I could do to help find out why this is happening?

@sorab2142 I'm not seeing this since I have upgraded to the latest VS Code and .NET Core. I also updated the C# extension in VS Code. I'm on Windows 10. My version of the C# extension is 1.3.0, VS Code 1.3.1 and .NET 1.0.0-preview2-003121

I don't know if that will help you but I'm not seeing this anymore.

@trendoid I'm seeing the issue on my machine using Windows 10, C# extension 1.3.0 and vs code 1.3.1 and .NET 1.0.0-preview2-003121. Is there any other information I can send that would be helpful in resolving this?

@matthewreily: Could you provide your OmniSharp log output?

I would love to, unfortunately I nuked my machine and reinstalled everything from the OS up. I had a tight deadline with a presentation I was doing on cross platform dev and .net core. I'll see if I can't recreate in my new environment and send the log if so. Thank you so much for following up!

The only thing i see in the vs code panel for Omnisharp Log is that one line (Cannot Start Omnisharp [ERROR] Error: spawn cmd ENOENT), is there some file that has more info?

I had this problem using Windows 10 and solved it by adding "C:\Windows\System32\" in the PATH variable.

@ChristianoKiss thank you that worked.

I suspect that this may be addressed with the latest version of the extension (1.5.2). We've recently made a lot of changes under the hood to how OmniSharp is packaged and runs that should fix these issues. Please let me know if you run into these problems on the new release.

Having this problem 1 year later and the path solution worked... Seems strange that it wasn't already in the path. I recall that normally being there.

Hi,
>
Starting OmniSharp server at 2018-2-11 11:48:38
Target: c:\inWORK\UNITY Projects\Visockiy\Visockiy.sln
[ERROR] Error: spawn cmd ENOENT


VSC ver. 1.20.00 x64
ext: Unity Debugger, OmiSharp
Unity 2017.3.1f3

thank you so much at @ChristianoKiss

thanks, @ChristianoKiss :D

On Linux adding ~/.vscode/extensions to my path fixed it.

e.g. in your .bashrc

export PATH=$HOME/.vscode/extensions:$PATH

Was this page helpful?
0 / 5 - 0 ratings