I have this topic, which got solved:
https://discourse.nixos.org/t/dotnet-script-libhostfxr-so-not-found/22346/11
, but I face the same issue if I run omnisharp:
omnisharp
A fatal error occurred. The required library libhostfxr.so could not be found.
If this is a self-contained application, that library should exist in [/nix/store/y0y6vlc2vz9l60ipivx2sz9c8h5j9wy1-omnisharp-roslyn-1.38.2/src/].
If this is a framework-dependent application, install the runtime in the global location [/usr/share/dotnet] or use the DOTNET_ROOT environment variable to specify the runtime location or register the runtime location in [/etc/dotnet].
The .NET runtime can be found at:
- https://aka.ms/dotnet-core-applaunch?missing_runtime=true&arch=x64&rid=nixos.22.05-x64&apphost_version=6.0.5
env|grep -i dotnet_root
DOTNET_ROOT=/nix/store/3axaxgbragp3zhb20i2swfqdwdnl1b3v-dotnet-sdk-6.0.300/