coc-extensions / coc-omnisharp

OmniSharp integration for coc.nvim
MIT License
118 stars 11 forks source link

Use of GAC folder in bundled mono distribution requires setting FrameworkPathOverride to global mono #70

Closed ianisl closed 5 months ago

ianisl commented 2 years ago

First of all, thanks for the great plugin.

This is not an issue per se but I am encountering some behavior I have a hard time wrapping my head around.

I am using Vim within WSL2 to edit the code of a Windows Visual Studio project (Rhino3D plugin). The project compiles fines on Windows.

Since my Vim install lives in WSL2, I have to find a way to reference some assemblies used by the project, but I can't modify the build config of the project, which is setup for the Windows build. Therefore I am trying to use mono's GAC to have coc-omnisharp provide completion for these assemblies.

I have noticed that the mono distribution that comes with coc-omnisharp contains a GAC folder, located at ~/.config/coc/extensions/coc-omnisharp-data/server/lib/mono/gac. I have installed my assemblies there with gacutil. However, in order for the completion to work with this GAC folder, I have to set up the FrameworkPathOverride environment variable to reference the global mono install:

$ export FrameworkPathOverride=/usr/lib/mono/4.5

With this, LSP completion works perfectly.

Any idea on the rationale behind this behavior?

ianisl commented 5 months ago

Closing this as this is no longer relevant since OmniSharp no longer includes Mono (see: https://github.com/OmniSharp/omnisharp-roslyn/commit/cd4de6d4bd86c29c8dcb0ec96b1c78bb3c32f2a1)