vscode-csharp icon indicating copy to clipboard operation
vscode-csharp copied to clipboard

Cannot Start Omnisharp [ERROR] Error: spawn cmd ENOENT

Open alexdima opened this issue 10 years ago • 17 comments

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.

alexdima avatar Feb 09 '16 12:02 alexdima

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

trendoid avatar Feb 12 '16 15:02 trendoid

@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 avatar Jul 21 '16 00:07 DustinCampbell

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

sorab2142 avatar Jul 29 '16 11:07 sorab2142

@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 avatar Jul 29 '16 12:07 trendoid

@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 avatar Aug 02 '16 14:08 matthewreily

@matthewreily: Could you provide your OmniSharp log output?

DustinCampbell avatar Aug 17 '16 22:08 DustinCampbell

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!

matthewreily avatar Aug 18 '16 13:08 matthewreily

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?

sorab2142 avatar Aug 19 '16 05:08 sorab2142

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

ChristianoKiss avatar Aug 20 '16 21:08 ChristianoKiss

@ChristianoKiss thank you that worked.

sorab2142 avatar Sep 19 '16 11:09 sorab2142

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.

DustinCampbell avatar Nov 15 '16 23:11 DustinCampbell

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.

insominx avatar Dec 20 '17 19:12 insominx

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

Gazenvagin avatar Feb 11 '18 08:02 Gazenvagin

Add path to environment works http://reddyinfosoft.blogspot.com/2017/07/cannot-start-omnisharp-error-error.html

BedmanGit avatar Jan 10 '19 16:01 BedmanGit

thank you so much at @ChristianoKiss

genesis-1 avatar Dec 21 '19 10:12 genesis-1

thanks, @ChristianoKiss :D

imsuck avatar Jan 16 '20 09:01 imsuck

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

e.g. in your .bashrc

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

connormulcahey avatar Jul 11 '20 08:07 connormulcahey