OmniSharp server fails to initialise on NixOS
See original GitHub issueEnvironment data
dotnet --info
output:
.NET Core SDK (reflecting any global.json):
Version: 3.0.100
Commit: 04339c3a26
Runtime Environment:
OS Name: nixos
OS Version: 19.09.840.8bf142e001b
OS Platform: Linux
RID: linux-x64
Base Path: /nix/store/hmzz1c5qz5z8s4i3jwavfrnp386g0gl9-dotnet-sdk-3.0.100/sdk/3.0.100/
Host (useful for support):
Version: 3.0.0
Commit: 7d57652f33
.NET Core SDKs installed:
3.0.100 [/nix/store/hmzz1c5qz5z8s4i3jwavfrnp386g0gl9-dotnet-sdk-3.0.100/sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.App 3.0.0 [/nix/store/hmzz1c5qz5z8s4i3jwavfrnp386g0gl9-dotnet-sdk-3.0.100/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.0.0 [/nix/store/hmzz1c5qz5z8s4i3jwavfrnp386g0gl9-dotnet-sdk-3.0.100/shared/Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download
VS Code version: 1.39.1 C# Extension version: 1.21.5
Steps to reproduce
Install VSCode on NixOS, install the C# extension and open a .NET Core project.
Have the default setting "omnisharp.path": "latest"
.
Expected behavior
The OmniSharp server loads successfully.
Actual behavior
OmniSharp log states:
Starting OmniSharp server at 21/10/2019, 13:39:35
Target: /home/felschr/Documents/projects/MyProject/MyProject.sln
OmniSharp server started.
Path: /home/felschr/.vscode/extensions/ms-vscode.csharp-1.21.5/.omnisharp/1.34.6-beta.34/run
PID: 23523
/home/felschr/.vscode/extensions/ms-vscode.csharp-1.21.5/.omnisharp/1.34.6-beta.34/run: line 27: /home/felschr/.vscode/extensions/ms-vscode.csharp-1.21.5/.omnisharp/1.34.6-beta.34/bin/mono: No such file or director
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
[Solved] Problems with OmniSharp and Visual Studio Code
After the update, OmniSharp fails to validate the Unity project files and the editor refuses to initialize IntelliSense.
Read more >Why is omnisharp not working? - Stack Overflow
I am running through the same path as you (*nix + emacs + omnisharp). ... As long as you get the "N Error(s)"...
Read more >Hello OmniSharp on .NET 6.0! | StrathWeb. A free flowing web ...
NET 6.0 build of OmniSharp. For opening legacy .NET Framework projects, the global Mono O# variant is still needed (*nix) or the .NET...
Read more >Troubleshooting - LSP Mode - LSP support for Emacs
Make sure that emacs is using the proper path by running emacs from terminal. Modify the path using setpath function. Server path#. Look...
Read more >I Was Wrong about Nix | Hacker News
Nix does not set up my Visual Studio and XCode environments, ... Oh, and when the Omnisharp guys start requiring a new version...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@FelschR you can check out this https://github.com/NixOS/nixpkgs/pull/57205 to see how to use omnisharp with vscode in NixOS 19.09
@FelschR You can’t execute arbitrary binaries in NixOS. You have to use PatchELF on them first https://nixos.org/patchelf.html So manually downloading omnisharp won’t help in your situation either. This is a NixOS specific issue.