-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
omnisharp can't find libhostfxr.so #166543
Comments
I found the cause for this issue on my machine. I was using - dotnet-combined = with pkgs.dotnetCorePackages;
- combinePackages [ sdk_6_0 ];
+ dotnet-combined = pkgs.dotnetCorePackages.sdk_6_0; This works for my use-case since I only have one SDK installed at the moment. It's not optimal, though and it was working previously at some point. |
Also, if I nixpkgs/pkgs/development/tools/omnisharp-roslyn/default.nix Lines 98 to 100 in 710fed5
|
I get another error now, though:
Possibly related: |
I got the same error. Is it caused by a version incompatibility? The latest version of the v1.38.2 of |
Omnisharp has been updated to v1.38.2 (on master, at least), does this error still occur? |
Still occurs for me. Now the error is that it cannot find System.Configuration.ConfigurationManager with version 4.0.3 It seems there is a mismatch, dotnet-sdk package contains System.Configuration.ConfigurationManager with version 4.0.0:
The same error was reported in omnisharp repository - OmniSharp/omnisharp-roslyn#2383 |
I've been seeing that same error thrown on my end as well. Went ahead and bumped the dotnet core packages, and that doesn't seem to change the result (tested sdk 6.0.202):
Interestingly, sdk 7.0.100-preview.3.22179.4 also showed 4.0.0.0:
(Will be PRing the updates, and addition of 7.0, momentarily) |
Possibly related: |
Seems like the omnisharp-roslyn package incorretly refernces this dll. It seems like a problem with the upstream repo, not the nix packaging. Btw, I made a PR with the dotnet 6 bump here: #168486 |
Still getting this error, anyone has a solution for it?
UPDATE: Downgrading this single package to stable temporarily fixed it. |
After some investigation, the issue with System.Config.ConfigurationManager in upstream repo was fixed by OmniSharp/omnisharp-roslyn#2359 This was fixed by removing the problematic dll during build, causing omnisharp-roslyn to find the dll in dotnet sdk folder, and bind properly. But since it was added to the build.cake file, which nix build doesn't use, the fix did not carry over to nixpkgs. The simple solution is to add a manual removal of dlls to the omnisharp-roslyn = super.omnisharp-roslyn.overrideAttrs (old: rec {
installPhase = ''
mkdir -p $out/bin
cp -r bin/Release/OmniSharp.Stdio.Driver/net6.0 $out/src
# Delete files to mimick hacks in https://github.com/OmniSharp/omnisharp-roslyn/blob/bdc14ca/build.cake#L594
rm $out/src/NuGet.*.dll
rm $out/src/System.Configuration.ConfigurationManager.dll
makeWrapper $out/src/OmniSharp $out/bin/omnisharp \
--prefix DOTNET_ROOT : ${super.dotnet-sdk} \
--suffix PATH : ${super.dotnet-sdk}/bin
'';
}); I'm going to try adding the above fix in a PR to nixpkgs. |
Describe the bug
omnisharp
complains that it can't findlibhostfxr.so
.Steps To Reproduce
Install
omnisharp-roslyn
& try to start it.Expected behavior
omnisharp
should work without throwing an error, at least whenDOTNET_ROOT
is set.Notify maintainers
@tesq0 @ericdallo @corngood
Metadata
The text was updated successfully, but these errors were encountered: