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 server not found #938

Closed
jdbenitezh opened this issue Nov 15, 2016 · 26 comments
Closed

omnisharp server not found #938

jdbenitezh opened this issue Nov 15, 2016 · 26 comments

Comments

@jdbenitezh
Copy link

Environment data

dotnet --info output:

.NET Command Line Tools (1.0.0-preview2-003131)

Product Information:
Version: 1.0.0-preview2-003131
Commit SHA-1 hash: 635cf40e58

Runtime Environment:
OS Name: Windows
OS Version: 10.0.14393
OS Platform: Windows
RID: win10-x64

VS Code version:
1.7.1
C# Extension version:
1.5.1

Steps to reproduce

starting vsCode

Expected behavior

server started.

Actual behavior

OmniSharp server started
Path: C:\Users\julio.vscode\extensions\ms-vscode.csharp-1.5.1\bin\omnisharp\OmniSharp.exe
PID: 6572

The system can not find the path specified.

@DustinCampbell
Copy link
Member

@almoazib, it might seem an obvious question, but does that file exist at that path? If not, try the following.

  1. Close Visual Studio Code
  2. Delete the following files/folders:

C:\Users\julio.vscode\extensions\ms-vscode.csharp-1.5.1.debugger
C:\Users\julio.vscode\extensions\ms-vscode.csharp-1.5.1\bin
C:\Users\julio.vscode\extensions\ms-vscode.csharp-1.5.1\install.lock

Now, re-open Visual Studio Code and it should try to re-download OmniSharp and other associated dependencies.

@jdbenitezh
Copy link
Author

i have only the file install.lock. Deleting the problem persists.
Uninstalling all extensions and deleting folder C:\Users\julio.vscode\extensions\ and installing C# for Visual Studio Code (powered by OmniSharp) the problem persists.

I have build omnisharp.exe from source code and setting his location in the extension config it starts correcly

@DustinCampbell
Copy link
Member

If you only have the install.lock file, then it seems like nothing is downloading at all (or at least, not extracting and installing). When you launch the C# extension for the first time, did an output window appear with text showing OmniSharp and the .NET Core debugger downloading and installing?

@jdbenitezh
Copy link
Author

it appears but the output is this

Updating C# dependencies...

Finished

@DustinCampbell
Copy link
Member

@almoazib: I know that you mentioned in the issue report that you are using VS Code 1.7.1, but I'm curious to know you're actually using VS Code Insiders. There was a recent regression in Insiders that might cause this.

@jdbenitezh
Copy link
Author

i downloaded vscode from this page http://code.visualstudio.com/ it is not insiders

@DustinCampbell
Copy link
Member

Add you running behind a proxy or anything like that?

@jdbenitezh
Copy link
Author

no, i am not behind a proxy. I have disabled windows firewall. the problem persists.

After that, i have downloaded vscode insiders 1.8 and the problem is the same.

@DustinCampbell
Copy link
Member

Could you post the contents of the C:\Users\julio.vscode\extensions\ms-vscode.csharp-1.5.1\package.json file here? Thanks!

@jdbenitezh
Copy link
Author

i attached

package.json.txt

@DustinCampbell
Copy link
Member

Thanks! Everything looks like it should be working. I'm going to add some diagnostic info to the next release (later today) that we can use to figure out what's happening on your machine.

@DustinCampbell
Copy link
Member

OK. I've just created a new release here. Before we push this to the marketplace, I'd like to see if we can use it to get a bit more information about what's happening on your machine. Could you install it? Use the following steps to install:

  1. Download the VSIX from here
  2. Open Visual Studio Code
  3. Select View->Extensions to display the Extensions pane.
  4. In the Extensions pane, click the little gear icon next to the C# extension and select Uninstall.
  5. Confirm any prompts and allow Visual Studio Code to reload itself.
  6. In the Extensions pane, click the [...] that appears in the top-right corner and select "Install from VSIX..."
  7. Select the VSIX you downloaded.
  8. Let Visual Studio Code reload itself.

With that installed, open a C# file and let me know what you see in the Output window when it tries to download dependencies.

@jdbenitezh
Copy link
Author

the output is

Updating C# dependencies...
Platform: win32, 64 bits

Finished

@DustinCampbell
Copy link
Member

It's that precisely? "64 bits"?

@jdbenitezh
Copy link
Author

yes, it is.

captura

@DustinCampbell
Copy link
Member

Ah, I see the problem! We're executing "wmic os get osarchitecture" to determine whether the current platform is x86 or x64. However, it looks like that property is localized, which is why its failing. (We're looking for "32-bit" or "64-bit"). I'll prepare a fix.

@DustinCampbell
Copy link
Member

OK. Let's try again. I've checked in a fix and refreshed the 1.5.2 release. Could you follow the same steps to install it?

@jdbenitezh
Copy link
Author

it works! Thank you very much!

Updating C# dependencies...
Platform: win32, x86_64 (win7-x64)

Downloading package 'OmniSharp (.NET 4.6 / x64)' (12309 KB) .................... Done!
Downloading package '.NET Core Debugger (Windows / x64)' (21295 KB) .................... Done!

Installing package 'OmniSharp (.NET 4.6 / x64)'
Installing package '.NET Core Debugger (Windows / x64)'

Finished

@DustinCampbell
Copy link
Member

Fantastic! Thanks very much for your patience.

@cwe1ss
Copy link

cwe1ss commented Nov 16, 2016

1.5.2 fixed this error for me as well - thanks very much!

@DustinCampbell
Copy link
Member

Glad to hear it.

@juanmcutrera
Copy link

Same issue. Folder bin and .debug don´t exist anymore. OmniSharp.exe doesnt't exists. Operating system Windows 10 Home Edition.

@DustinCampbell
Copy link
Member

@janmcutera: What version of the C# extension do you have installed? Did you delete all of the files specified above? Could you provide more information? FWIW, it's probably better to file a new issue with additional detail rather than comment on an older, closed issue.

@enricforn
Copy link

Same issue. Currently using C# extension version 1.5.3, vs code 1.8 on W10. When try to download .NET Code Debugger. Im using dotnet sdk 1.0.0-preview5-004232

@DustinCampbell
Copy link
Member

@enricforn: Could you file a new issue rather than posting a new message on this issue? The root cause of this issue has definitely been solved and we'll want to gather more information about the behavior you're seeing. Thanks!

@DrewBefore
Copy link

DrewBefore commented Jun 22, 2017

I solved the problem! Inside vsCode I needed to go to my settings. ctrl+shift+p > and then type user settings. This brought up settings.json

Inside the json the path looked like this:

"omnisharp.path": "C:\Users\Drew\.vscode\extensions\ms-vscode.csharp-1.10.0\bin\omnisharp\OmniSharp.exe",

I changed it to this:

"omnisharp.path": "C:\\Users\\Drew\\.vscode\\extensions\\ms-vscode.csharp-1.10.0\\bin\\omnisharp\\OmniSharp.exe",

The \ were not being escaped and causing an error in the json. Also note that capitilization is important.

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

6 participants