Omnisharp-vscode: Cannot open OmniSharp assembly: No such file or directory

Created on 10 Dec 2018  路  2Comments  路  Source: OmniSharp/omnisharp-vscode

Environment data

Operating system: MacOS High Sierra 10.13.6

dotnet --info output:

Host (useful for support):
  Version: 2.2.0
  Commit:  1249f08fed

.NET Core SDKs installed:
  2.1.4 [/usr/local/share/dotnet/sdk]
  2.1.301 [/usr/local/share/dotnet/sdk]
  2.1.302 [/usr/local/share/dotnet/sdk]
  2.2.100 [/usr/local/share/dotnet/sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.All 2.1.1 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.1.2 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.2.0 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.1.1 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.1.2 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.2.0 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 2.0.5 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.1 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.2 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.2.0 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs:
  https://aka.ms/dotnet-download

VS Code version: 1.29.1

C# Extension version: 1.17.1

mono version: 5.16.0.220

Steps to reproduce

Opening a C# file from Unity project.

Expected behavior

OmniSharp runs as normal. IntelliSense debugs code in real time.

Actual behavior

OmniSharp does not start. The output is as follows:

Starting OmniSharp server at 12/10/2018, 8:56:50 PM
    Target: /Users/Shared/Unity/new_BattleForBFDIBattle/new_BattleForBFDIBattle.sln

OmniSharp server started with Mono 5.16.0.
    Path: /Users/yazid/.vscode/extensions/ms-vscode.csharp-1.17.1/.omnisharp/1.32.8/omnisharp/OmniSharp.exe
    PID: 31933

Cannot open assembly '/Users/yazid/.vscode/extensions/ms-vscode.csharp-1.17.1/.omnisharp/1.32.8/omnisharp/OmniSharp.exe': No such file or directory.
[ERROR] Error: OmniSharp server load timed out. Use the 'omnisharp.projectLoadTimeout' setting to override the default delay (one minute).

It seems that there is no omnisharp.exe installed. I checked for the file by pressing Cmd+Shift+Period in Finder to view hidden files. Here's a picture:

screen shot 2018-12-10 at 9 32 14 pm

How do you install the omnisharp.exe file? Any help would be appreciated. Thank you for your time.

Most helpful comment

Well, I guess I found the solution myself..

Solution

  1. Uninstall C# extension on VSCode. If Unity Debugger extension blocks you from doing that, uninstall that first.

  2. In Finder, delete the entire ms-vscode.csharp-1.17.1 folder in .vscode/extensions/

  3. Reinstall C# extension. It will download everything including omnisharp.exe

This has been an easy and somewhat unnecessary, but I hope people who come across the same problem knows what to do. Thank you :)

All 2 comments

Well, I guess I found the solution myself..

Solution

  1. Uninstall C# extension on VSCode. If Unity Debugger extension blocks you from doing that, uninstall that first.

  2. In Finder, delete the entire ms-vscode.csharp-1.17.1 folder in .vscode/extensions/

  3. Reinstall C# extension. It will download everything including omnisharp.exe

This has been an easy and somewhat unnecessary, but I hope people who come across the same problem knows what to do. Thank you :)

@SmolPadok Glad you figured it out. @akshita31 is working on improving this experience.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

yufeih picture yufeih  路  3Comments

ghost picture ghost  路  3Comments

tstivers1990 picture tstivers1990  路  3Comments

kiminuo picture kiminuo  路  3Comments

mattwoberts picture mattwoberts  路  3Comments