You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was hitting omnisharp errors loading my Unity project:
This project targets .NET version that requires reference assemblies that do not ship with OmniSharp out of the box (e.g. .NET Framework). The most common solution is to make sure Mono is installed on your machine (https://mono-project.com/download/) and that OmniSharp is started with that Mono installation (e.g. "omnisharp.useGlobalMono":"always" in C# Extension for VS Code)
This comment in the omnisharp-roslyn repo suggests that omnisharp ships with a version of mono that intentionally omits the reference assemblies, and that vscode users should toggle this setting to use global mono (which tells the omnisharp vscode extension to use the version of mono on the users PATH to start the omnisharp server). I don't see any equivalent options here.
The run script provided by omnisharp-roslyn doesn't have any options for supplying a custom mono executable, but one possible solution would be to ship a custom run script with this extension and use that instead of the run script provided by omnisharp-roslyn, which would let users supply a custom mono path via coc-settings.json. But ideally this extension would do something similar to whatever the omnisharp vscode extension is doing when omnisharp.useGlobalMono is set.
I was hitting omnisharp errors loading my Unity project:
This comment in the omnisharp-roslyn repo suggests that omnisharp ships with a version of mono that intentionally omits the reference assemblies, and that vscode users should toggle this setting to use global mono (which tells the omnisharp vscode extension to use the version of mono on the users PATH to start the omnisharp server). I don't see any equivalent options here.
The workaround I came up with was to hack the run script (https://github.com/OmniSharp/omnisharp-roslyn/blob/master/mono-packaging/run) of the omnisharp language server download to use my globally installed mono, at which point things seemed to start working.
The run script provided by omnisharp-roslyn doesn't have any options for supplying a custom mono executable, but one possible solution would be to ship a custom run script with this extension and use that instead of the run script provided by omnisharp-roslyn, which would let users supply a custom mono path via
coc-settings.json
. But ideally this extension would do something similar to whatever the omnisharp vscode extension is doing whenomnisharp.useGlobalMono
is set.edit: Looks like the vscode extension uses the packaged run script on windows but on *nix systems it launches
OmniSharp.exe
with either the packaged version of mono or the globally available mono depending on that config option (see https://github.com/OmniSharp/omnisharp-vscode/blob/3534e25767984104d0748cf45457b51d8a598e59/src/omnisharp/launcher.ts#L276). Seems reasonable to try and do the same thing here?The text was updated successfully, but these errors were encountered: