Omnisharp-vscode: Editing Evolved doesn't work on Mac

Created on 31 Oct 2016  路  15Comments  路  Source: OmniSharp/omnisharp-vscode

Environment data

VS Code version: 1.6.1
C# Extension version: 1.4.1

I've got problem with this extension on MacOS

I installed latest VSCode and extension but I can't use:

  • Go to Definition
  • Find All references
    and other tools from editing evolved of VSCode.

When I try to use them nothing happens.

I'm working with Unity3D project.

Also I can't see that options in context menu as on screenshot:

zrzut ekranu 2016-10-31 o 18 13 33
.

Resolved-Fixed Unity

All 15 comments

I'm running the same versions of VSCode and C# Extension on El Capitan 10.11.5 without issue.

  1. Make sure you have the VSCode integration package in your Assets folder:
    https://www.assetstore.unity3d.com/en/#!/content/45320
  2. Go to Unity3D's preferences and ensure integration is enabled.
  3. Open top menu Assets >> Open C# Project in Code

I did these steps and still same issue.

Maybe its related to MacOs Sierra?

I have the same issue.

Are you also seeing "馃敟 Starting..." in the bottom right of VS Code? Clicking on that, it looks like OmniSharp is unable to finish starting, and that's probably why we're not seeing any of the "evolved" features... I don't know how to fix it, though.

Could you paste the content of the OmniSharp Log here?

  1. In Visual Studio Code, select View->Output to display the Output pane.
  2. In the top-right corner of the Output pane, select "OmniSharp Log" if it's not selected already.

logs here, from re-installing C# plugin then opening C# code in VSCode.

Installing OmniSharp to /Users/USER_NAME/.vscode/extensions/ms-vscode.csharp-1.4.1/out/.omnisharp-mono
    Attempting to download omnisharp-1.9-beta14-mono.tar.gz
    Downloading to /var/folders/fy/7ycl4dhx6m532kyv_hbwsngc0000gn/T/tmp-1509oufxpgAgSPC8.tmp...
    Download complete!
    Decompressing...
    Done! 160 files unpacked.

Starting OmniSharp server at 11/13/2016, 2:33:00 AM
    Target: /Users/USER_NAME/Desktop/Test/Test.sln

and no additional logs appears after that.
"馃敟 Starting..." is in the bottom right of VS Code.

Can I get more information from plug-in?

Hmmm... could you try the latest beta of the extension? We've made a lot of changes to how it acquires OmniSharp and launches. You can download the latest beta .vsix here and install it like so:

  1. Open Visual Studio Code
  2. Select View->Extensions from the menu to display the Extensions Pane
  3. In the Extensions Pane, click the gear icon for the C# extension and select "Uninstall". Once the extension is installed, allow Visual Studio Code to reload.
  4. In the Extensions Pane, click the [...] at the top-right corner and select "Install from VSIX...". Choose the beta .vsix you downloaded and allow Visual Studio Code to reload.

Let me know if this works better for you.

Okey, "馃敟 Running" is in the bottom right! but Editing Evolved is not working.

the C# log is below. looks good.

Updating C# dependencies...
Downloading package 'Mono Runtime (macOS)' (1543 KB) .................... Done!
Downloading package 'Mono Framework Assemblies' (5494 KB) .................... Done!
Downloading package 'OmniSharp (Mono 4.6)' (12867 KB) .................... Done!
Downloading package '.NET Core Debugger (macOS / x64)' (20149 KB) .................... Done!

Installing package 'Mono Runtime (macOS)'
Installing package 'Mono Framework Assemblies'
Installing package 'OmniSharp (Mono 4.6)'
Installing package '.NET Core Debugger (macOS / x64)'

Finished

and the OmniSharp Log log is below.

Starting OmniSharp server at 11/13/2016, 10:02:36 AM
    Target: /Users/choucho/Desktop/Test/Test.sln

OmniSharp server started wth Mono
    Path: /Users/choucho/.vscode/extensions/ms-vscode.csharp-1.5.0-beta8/bin/run
    PID: 1855

OmniSharp: -s /Users/choucho/Desktop/Test/Test.sln --hostPID 1838 --stdio DotNet:enablePackageRestore=false --encoding utf-8
锘匡豢{"Event":"log","Body":{"LogLevel":"INFORMATION","Name":"OmniSharp.Startup","Message":"Omnisharp server running using Stdio at location '/Users/choucho/Desktop/Test' on host 1838."},"Seq":1,"Type":"event"}
[INFORMATION:OmniSharp.DotNet.DotNetProjectSystem] Initializing in /Users/choucho/Desktop/Test
[INFORMATION:OmniSharp.DotNet.DotNetProjectSystem] Auto package restore: False
[INFORMATION:OmniSharp.DotNet.DotNetProjectSystem] Update workspace context
[INFORMATION:OmniSharp.DotNet.DotNetProjectSystem] Resolving projects references
[INFORMATION:OmniSharp#MSBuild] Detecting projects in '/Users/choucho/Desktop/Test/Test.sln'.
[INFORMATION:OmniSharp#MSBuild] Loading project from '/Users/choucho/Desktop/Test/Assembly-CSharp.csproj'.
[INFORMATION:OmniSharp#ProjectFileInfo] Using tools version: 15.0
[ERROR:OmniSharp#ProjectFileInfo] The reference assemblies for framework ".NETFramework,Version=v2.0" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend.
[WARNING:OmniSharp#MSBuild] Failed to process project file '/Users/choucho/Desktop/Test/Assembly-CSharp.csproj'.
/Users/choucho/Desktop/Test/Assembly-CSharp.csproj

[INFORMATION:OmniSharp#MSBuild] Loading project from '/Users/choucho/Desktop/Test/Assembly-CSharp-Editor.csproj'.
[INFORMATION:OmniSharp#ProjectFileInfo] Using tools version: 15.0
[ERROR:OmniSharp#ProjectFileInfo] The reference assemblies for framework ".NETFramework,Version=v2.0" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend.
[WARNING:OmniSharp#MSBuild] Failed to process project file '/Users/choucho/Desktop/Test/Assembly-CSharp-Editor.csproj'.
/Users/choucho/Desktop/Test/Assembly-CSharp-Editor.csproj

[INFORMATION:OmniSharp.Startup] Configuration finished.
Starting OmniSharp server at 11/13/2016, 10:03:06 AM
    Target: /Users/choucho/Desktop/Test/Test.sln

OmniSharp server started wth Mono
    Path: /Users/choucho/.vscode/extensions/ms-vscode.csharp-1.5.0-beta8/bin/run
    PID: 1868

OmniSharp: -s /Users/choucho/Desktop/Test/Test.sln --hostPID 1838 --stdio DotNet:enablePackageRestore=false --encoding utf-8
锘匡豢{"Event":"log","Body":{"LogLevel":"INFORMATION","Name":"OmniSharp.Startup","Message":"Omnisharp server running using Stdio at location '/Users/choucho/Desktop/Test' on host 1838."},"Seq":1,"Type":"event"}
[INFORMATION:OmniSharp.DotNet.DotNetProjectSystem] Initializing in /Users/choucho/Desktop/Test
[INFORMATION:OmniSharp.DotNet.DotNetProjectSystem] Auto package restore: False
[INFORMATION:OmniSharp.DotNet.DotNetProjectSystem] Update workspace context
[INFORMATION:OmniSharp.DotNet.DotNetProjectSystem] Resolving projects references
[INFORMATION:OmniSharp#MSBuild] Detecting projects in '/Users/choucho/Desktop/Test/Test.sln'.
[INFORMATION:OmniSharp#MSBuild] Loading project from '/Users/choucho/Desktop/Test/Assembly-CSharp.csproj'.
[INFORMATION:OmniSharp#ProjectFileInfo] Using tools version: 15.0
[ERROR:OmniSharp#ProjectFileInfo] The reference assemblies for framework ".NETFramework,Version=v2.0" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend.
[WARNING:OmniSharp#MSBuild] Failed to process project file '/Users/choucho/Desktop/Test/Assembly-CSharp.csproj'.
/Users/choucho/Desktop/Test/Assembly-CSharp.csproj

[INFORMATION:OmniSharp#MSBuild] Loading project from '/Users/choucho/Desktop/Test/Assembly-CSharp-Editor.csproj'.
[INFORMATION:OmniSharp#ProjectFileInfo] Using tools version: 15.0
[ERROR:OmniSharp#ProjectFileInfo] The reference assemblies for framework ".NETFramework,Version=v2.0" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend.
[WARNING:OmniSharp#MSBuild] Failed to process project file '/Users/choucho/Desktop/Test/Assembly-CSharp-Editor.csproj'.
/Users/choucho/Desktop/Test/Assembly-CSharp-Editor.csproj

[INFORMATION:OmniSharp.Startup] Configuration finished.

and so, sorry I forgot to show my env detail.

macOS sierra:10.12.1
VSCode:1.7.1
dotnet:1.0.1
Unity:5.4.2p4

You'll need to have Mono installed in order to find reference assemblies. Obviously, you have Mono installed for Unity, but the extension isn't finding it. At a terminal window, could you type which mono and let me know the output?

hmm,
in terminal, mono version is below.

$ which mono
(nothing appears.)
$ mono
-bash: mono: command not found

I think Unity doesn't install mono. it only contained their own mono libs into there Unity.app package.
e.g. /Applications/Unity/Unity.app/SOMEWHERE/mono libs

and it may not be found by other program.

so now, I've installed mono via homebrew.

$ mono -V
Mono JIT compiler version 4.6.1 (Stable 4.6.1.5/ef43c15 Tue Oct 18 11:06:44 BST 2016)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
    TLS:           normal
    SIGSEGV:       altstack
    Notification:  kqueue
    Architecture:  amd64
    Disabled:      none
    Misc:          softdebug 
    LLVM:          supported, not enabled.
    GC:            sgen

then, restart VSCode,
"馃敟 Running" is in the bottom right. but Editing Evolved is not working.
logs are not changed yet.

thanks. I should have an update shortly that I hope will address this for you.

OK. I think I've got it working. Close Visual Studio Code and execute the following commands at a terminal window:

rm -rf /Users/choucho/.vscode/extensions/ms-vscode.csharp-1.5.0-beta8/.debugger
rm -rf /Users/choucho/.vscode/extensions/ms-vscode.csharp-1.5.0-beta8/bin
rm -rf /Users/choucho/.vscode/extensions/ms-vscode.csharp-1.5.0-beta8/install.lock

Now, start Visual Studio Code. It should acquire new dependencies for the C# extension and, so long as you have Mono installed via homebrew or the official Mono installer, it should locate the necessary reference assemblies. Let me know if it works better for you.

it works like a charm!

re-downloading make it works.

now I saw these functions works fine.

  • IntelliSense
  • Parameter Hints
  • Hover
  • Go to Definition
    and more.

thank you for great work.

Aha, "brew install mono" did fix it for me too, using the C# 1.4.1 extension. Thank you!

Glad to here it's working for you gents! @rafalswiech3, @MetaMythril: Could you let me know if any of the help in this issue address the problem for you? I'm marking this issue as resolved.

I just pushed 1.5.0 to the VS marketplace. Hopefully, the new release will work for you!

Was this page helpful?
0 / 5 - 0 ratings