Jetbrains Rider 2024.3 can not resolve the dotnet sdk on startup. This seems to be caused by the post install script of the package linking in the wrapped sdk and not the actual sdk location.
Steps To Reproduce
Add pkgs.jetbrains.rider to system packages.
Start rider and try to create or open a solution
Expected behavior
The solution opens and can be compiled and worked with.
Screenshots
Additional context
Starting rider one of the first error messages shows that rider seems to be unable to resolve the dotnet sdk properly.
2024-11-22 16:25:15,605 [ 181] SEVERE - #c.j.r.p.ProtocolManager - java.io.FileNotFoundException: No 'linux-x64/dotnet/dotnet' found in locations: '%RESHARPER_HOST_BIN%'(null), '/nix/store/3iajv66mqlni62mpi03z9gr3rqfndv02-rider-2024.3/rider/lib/ReSharperHost'
java.util.concurrent.ExecutionException: java.io.FileNotFoundException: No 'linux-x64/dotnet/dotnet' found in locations: '%RESHARPER_HOST_BIN%'(null), '/nix/store/3iajv66mqlni62mpi03z9gr3rqfndv02-rider-2024.3/rider/lib/ReSharperHost'
Poking around in the filesystem a bit I could see that:
which indicates that resharper is pointed to the nix wrapper for the sdk which does not resolve to the actual location of the sdk.
$ ls -la /nix/store/3iajv66mqlni62mpi03z9gr3rqfndv02-rider-2024.3/rider/lib/ReSharperHost/linux-x64/dotnet/bin/dotnet
lrwxrwxrwx 1 root root 73 1 jan 1970 /nix/store/3iajv66mqlni62mpi03z9gr3rqfndv02-rider-2024.3/rider/lib/ReSharperHost/linux-x64/dotnet/bin/dotnet -> /nix/store/kmafnn0290xfll76rrzxba9abys23578-dotnet-sdk-7.0.410/bin/dotnet
show the location of the unwrapped sdk so rider needs linux-x64/dotnet/dotnet in rider/lib/ReSharperHost to actually point to the unwrapped sdk locations share/dotnet folder.
I managed to make it work with the below modification to my configuration file:
(jetbrains.rider.overrideAttrs (attrs: {
postInstall = (attrs.postInstall or "") + lib.optionalString (stdenv.hostPlatform.isLinux) ''
(
cd $out/rider
ls -d $PWD/plugins/cidr-debugger-plugin/bin/lldb/linux/*/lib/python3.8/lib-dynload/* |
xargs patchelf \
--replace-needed libssl.so.10 libssl.so \
--replace-needed libcrypto.so.10 libcrypto.so \
--replace-needed libcrypt.so.1 libcrypt.so
for dir in lib/ReSharperHost/linux-*; do
rm -rf $dir/dotnet
ln -s ${dotnet-sdk_7.unwrapped}/share/dotnet $dir/dotnet
done
)
'';
}))
So the difference is on this line in the jetbrains/default.nix file. Essentially I've just used the unwrapped location of the sdk. However, very unsure if this is the desired setup or if the wrapper should be fixed so it can support other tools :shrug:
Metadata
system: "x86_64-linux"
host os: Linux 6.11.9, NixOS, 25.05 (Warbler), 25.05.20241119.23e89b7
Describe the bug
Jetbrains Rider 2024.3 can not resolve the dotnet sdk on startup. This seems to be caused by the post install script of the package linking in the wrapped sdk and not the actual sdk location.
Steps To Reproduce
Add pkgs.jetbrains.rider to system packages. Start rider and try to create or open a solution
Expected behavior
The solution opens and can be compiled and worked with.
Screenshots
Additional context
Starting rider one of the first error messages shows that rider seems to be unable to resolve the dotnet sdk properly.
Poking around in the filesystem a bit I could see that:
which indicates that resharper is pointed to the nix wrapper for the sdk which does not resolve to the actual location of the sdk.
show the location of the unwrapped sdk so rider needs
linux-x64/dotnet/dotnet
inrider/lib/ReSharperHost
to actually point to the unwrapped sdk locationsshare/dotnet
folder.I managed to make it work with the below modification to my configuration file:
So the difference is on this line in the jetbrains/default.nix file. Essentially I've just used the unwrapped location of the sdk. However, very unsure if this is the desired setup or if the wrapper should be fixed so it can support other tools :shrug:
Metadata
"x86_64-linux"
Linux 6.11.9, NixOS, 25.05 (Warbler), 25.05.20241119.23e89b7
yes
yes
nix-env (Nix) 2.24.10
/nix/store/c9wv7i0af6mysmy65x6nvyfw5izzxv4g-source
Notify maintainers
@raphaelr You are mentioned as the maintainer of the jetbrains.rider package.
Many thanks!
Note for maintainers: Please tag this issue in your PR.
Add a :+1: reaction to issues you find important.