Omnisharp-vscode: Omnisharp not working on Mac

Created on 14 Nov 2019  Â·  7Comments  Â·  Source: OmniSharp/omnisharp-vscode

After installing all new versions (.NET Core, Mono, VS Code, Blazor template), omnisharp does not work anymore.

Logs

image

OmniSharp log


Starting OmniSharp server at 11/14/2019, 10:59:46 PM
Target: /Users/gerjan/Development/BlazorPortfolio

OmniSharp server started with Mono 6.4.0.
Path: /Users/gerjan/.vscode/extensions/ms-vscode.csharp-1.21.7/.omnisharp/1.34.7/omnisharp/OmniSharp.exe
PID: 81837

    Starting OmniSharp on MacOS 10.15.1 (x64)
    DotNetPath set to dotnet
    Located 2 MSBuild instance(s)
        1: Mono 16.3 - "/usr/local/Cellar/mono/6.4.0.198/lib/mono/msbuild/Current/bin"
        2: StandAlone 16.3 - "/Users/gerjan/.vscode/extensions/ms-vscode.csharp-1.21.7/.omnisharp/1.34.7/omnisharp/.msbuild/Current/Bin"
    Registered MSBuild instance: Mono 16.3 - "/usr/local/Cellar/mono/6.4.0.198/lib/mono/msbuild/Current/bin"
        CscToolExe = csc.exe
        CscToolPath = /Users/gerjan/.vscode/extensions/ms-vscode.csharp-1.21.7/.omnisharp/1.34.7/omnisharp/.msbuild/Current/Bin/Roslyn
    Detecting Cake files in '/Users/gerjan/Development/BlazorPortfolio'.
    Could not find any Cake files
    No solution files found in '/Users/gerjan/Development/BlazorPortfolio'
    Queue project update for '/Users/gerjan/Development/BlazorPortfolio/BlazorPortfolio.csproj'
    Detecting CSX files in '/Users/gerjan/Development/BlazorPortfolio'.
    Could not find any CSX files
    Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpFormattingWorkspaceOptionsProvider, Order: 0
    Loading project: /Users/gerjan/Development/BlazorPortfolio/BlazorPortfolio.csproj
    Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.RenameWorkspaceOptionsProvider, Order: 100
    Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.EditorConfigWorkspaceOptionsProvider, Order: 200
    Configuration finished.
    Omnisharp server running using Stdio at location '/Users/gerjan/Development/BlazorPortfolio' on host 81814.
    Successfully loaded project file '/Users/gerjan/Development/BlazorPortfolio/BlazorPortfolio.csproj'.
    Adding project '/Users/gerjan/Development/BlazorPortfolio/BlazorPortfolio.csproj'
    Update project: BlazorPortfolio
    BlazorPortfolio: Did not find 'Microsoft.NETCore.App' in lock file.

C# log

This one is empty

Environment information

VSCode version: 1.40.1
C# Extension: 1.21.7

Mono Information
OmniSharp using global mono :6.4.0

Dotnet Information
.NET Core SDK (reflecting any global.json):
Version: 3.1.100-preview3-014645
Commit: b32d27f4b3

Runtime Environment:
OS Name: Mac OS X
OS Version: 10.15
OS Platform: Darwin
RID: osx.10.15-x64
Base Path: /usr/local/share/dotnet/sdk/3.1.100-preview3-014645/

Host (useful for support):
Version: 3.1.0-preview3.19553.2
Commit: 13f35c3d86

.NET Core SDKs installed:
3.1.100-preview3-014645 [/usr/local/share/dotnet/sdk]

.NET Core runtimes installed:
Microsoft.AspNetCore.App 3.1.0-preview3.19555.2 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.1.0-preview3.19553.2 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]

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


Visual Studio Code Extensions

|Extension|Author|Version|
|---|---|---|
|bracket-pair-colorizer-2|CoenraadS|0.0.28|
|csharp|ms-vscode|1.21.7|
|haskelly|UCL|0.5.5|
|Ionide-FAKE|Ionide|1.2.3|
|Ionide-fsharp|Ionide|4.3.1|
|Ionide-Paket|Ionide|1.12.0|
|language-haskell|justusadam|2.6.0|
|material-icon-theme|PKief|3.9.1|
|Material-theme|zhuangtongfa|2.28.3|
|nord-visual-studio-code|arcticicestudio|0.12.0|
|python|ms-python|2019.10.44104|
|rest-client|humao|0.22.2|
|rust|rust-lang|0.7.0|
|theme-dracula|dracula-theme|2.18.1|
|Theme-MaterialKit|ms-vscode|0.1.4|
|vscode-icons|vscode-icons-team|9.5.0|
|vscode-theme-onedark|akamud|2.1.0|
|vsliveshare|ms-vsliveshare|1.0.1245|;

Most helpful comment

After uninstalling mono with brew (brew uninstall mono), and installing it via https://www.mono-project.com/download/stable/, everything works ✅

mono --version

Mono JIT compiler version 6.4.0.198 (2019-06/fe64a4765e6 Wed Sep 18 14:14:51 EDT 2019)

msbuild

Microsoft (R) Build Engine version 16.3.0-ci for Mono

All 7 comments

image

One error that stands out:

[warn]: OmniSharp.MSBuild.PackageDependencyChecker
BlazorPortfolio: Did not find 'Microsoft.NETCore.App' in lock file.

Looks similar to #3314

I have installed mono with brew

brew install mono
mono --version

gives

Mono JIT compiler version 6.4.0.198 (tarball Mon Sep 30 16:34:14 BST 2019)

and msbuild

Microsoft (R) Build Engine version 16.1.85+gad9c9926a7 for Mono

After uninstalling mono with brew (brew uninstall mono), and installing it via https://www.mono-project.com/download/stable/, everything works ✅

mono --version

Mono JIT compiler version 6.4.0.198 (2019-06/fe64a4765e6 Wed Sep 18 14:14:51 EDT 2019)

msbuild

Microsoft (R) Build Engine version 16.3.0-ci for Mono

So the problem is (I think), mono via brew ships an older version of msbuild (16.1 vs 16.3)

Hi @gerjandev,

Glad things are working for you now. We definitely prefer the mono installer over a brew install.

-Joey

Was this page helpful?
0 / 5 - 0 ratings