Omnisharp-vscode: omnisharp server not found

Created on 15 Nov 2016  路  26Comments  路  Source: OmniSharp/omnisharp-vscode

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.

Bug Resolved-Fixed

All 26 comments

@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.1install.lock

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

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

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?

it appears but the output is this

Updating C# dependencies...

Finished

@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.

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

Add you running behind a proxy or anything like that?

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.

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

i attached

package.json.txt

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.

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.

the output is

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

Finished

It's that precisely? "64 bits"?

yes, it is.

captura

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.

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?

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

Fantastic! Thanks very much for your patience.

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

Glad to hear it.

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

@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.

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

@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!

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gregg-miskelly picture gregg-miskelly  路  3Comments

jrmcdona picture jrmcdona  路  3Comments

hamhub7 picture hamhub7  路  3Comments

Alumniminium picture Alumniminium  路  3Comments

mshinnie picture mshinnie  路  3Comments