I have some trouble with version 1.38.2, which was in 22.05, so I declared that I wanted to use the version from unstable, which is at 1.39.1
The first thing that was strange was that the binary is now called OmniSharp, whereas before it was called omnisharp. I can’t see this in the changelog?
Also, I get:
OmniSharp
It was not possible to find any compatible framework version
The framework 'Microsoft.NETCore.App', version '6.0.10' (x64) was not found.
- The following frameworks were found:
6.0.5 at [/nix/store/3axaxgbragp3zhb20i2swfqdwdnl1b3v-dotnet-sdk-6.0.300/shared/Microsoft.NETCore.App]
You can resolve the problem by installing the specified framework and/or SDK.
The specified framework can be found at:
- https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=6.0.10&arch=x64&rid=nixos.22.05-x64
Isn’t this supposed to pull that version down?
I have these declarations in packages:
unstable.dotnet-sdk
unstable.dotnetPackages.Nuget
ok, so this is strange, cause dotnet-sdk.6.0.402 is supposed to include dotnet-runtime.6.0.10, but it doesn’t; it includes dotnet-runtime.6.0.5
However, I declared dotnet-runtime to be installed as well, but then I get this:
warning: collision between `/nix/store/yp04rbmm3vnd14clgpv559w9vrqrmqmr-dotnet-runtime-6.0.10/bin/dotnet' and `/nix/store/06ykdw99hli03k2bwjvj404cv984hr0i-dotnet-sdk-6.0.402/bin/dotnet'
Known issue, ref: Collision of dotnet-sdk and dotnet-runtime · Issue #199413 · NixOS/nixpkgs · GitHub
Is there some way I can install dotnet-sdk, but exclude its runtime, or any other pointers?
Hmm, it seems like there is something weird going on due to you mixing up stable and unstable releases, is seems like maybe omnisharp is picking up the dotnet-sdk from the stable channel?
The dotnet-sdk always bundles it’s dotnet runtime, its impossible for dotnet-sdk to have a different dotnet-runtime version bundled.
For example, on my machine:
$ nix run nixpkgs#dotnet-sdk -- --info
.NET SDK:
Version: 6.0.402
Commit: 6862418796
Środowisko uruchomieniowe:
OS Name: nixos
OS Version: 22.11
OS Platform: Linux
RID: linux-x64
Base Path: /nix/store/xzcrqns22fn9sb92dmnqyl1rjg5qgf9d-dotnet-sdk-6.0.402/sdk/6.0.402/
global.json file:
Not found
Host:
Version: 6.0.10
Architecture: x64
Commit: 5a400c212a
.NET SDKs installed:
6.0.402 [/nix/store/xzcrqns22fn9sb92dmnqyl1rjg5qgf9d-dotnet-sdk-6.0.402/sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 6.0.10 [/nix/store/xzcrqns22fn9sb92dmnqyl1rjg5qgf9d-dotnet-sdk-6.0.402/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.10 [/nix/store/xzcrqns22fn9sb92dmnqyl1rjg5qgf9d-dotnet-sdk-6.0.402/shared/Microsoft.NETCore.App]
Download .NET:
https://aka.ms/dotnet-download
Learn about .NET Runtimes and SDKs:
https://aka.ms/dotnet/runtimes-sdk-info
The dotnet-runtime 6.0.5 seems to be picked up from the dotnet-sdk from a stable channel, you can see a reference to dotnet-sdk 6.0.300 in the error.
Hmm, it seems 6.0.5 isn’t even installed
b0ef $ ~ >
dotnet --list-sdks
6.0.402 [/nix/store/06ykdw99hli03k2bwjvj404cv984hr0i-dotnet-sdk-6.0.402/sdk]
b0ef $ ~ >
dotnet --list-runtimes
Microsoft.AspNetCore.App 6.0.10 [/nix/store/06ykdw99hli03k2bwjvj404cv984hr0i-dotnet-sdk-6.0.402/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.10 [/nix/store/06ykdw99hli03k2bwjvj404cv984hr0i-dotnet-sdk-6.0.402/shared/Microsoft.NETCore.App]
b0ef $ ~ >
OmniSharp
It was not possible to find any compatible framework version
The framework 'Microsoft.NETCore.App', version '6.0.10' (x64) was not found.
- The following frameworks were found:
6.0.5 at [/nix/store/3axaxgbragp3zhb20i2swfqdwdnl1b3v-dotnet-sdk-6.0.300/shared/Microsoft.NETCore.App]
You can resolve the problem by installing the specified framework and/or SDK.
The specified framework can be found at:
- https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=6.0.10&arch=x64&rid=nixos.22.05-x64
I also pull omnisharp from unstable
unstable.omnisharp-roslyn
EDIT; right, I forgot about that collision, so probably solve that first;)
if I remove
unstable.dotnet-sdk
unstable.dotnetPackages.Nuget
unstable.dotnet-runtime
and just declare
unstable.omnisharp-roslyn
, I still get the same message:
OmniSharp
It was not possible to find any compatible framework version
The framework 'Microsoft.NETCore.App', version '6.0.10' (x64) was not found.
- The following frameworks were found:
6.0.5 at [/nix/store/3axaxgbragp3zhb20i2swfqdwdnl1b3v-dotnet-sdk-6.0.300/shared/Microsoft.NETCore.App]
You can resolve the problem by installing the specified framework and/or SDK.
The specified framework can be found at:
- https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=6.0.10&arch=x64&rid=nixos.22.05-x64
and now I haven’t even declared any dotnet
b0ef $ ~ >
dotnet
The program 'dotnet' is not in your PATH. It is provided by several packages.
You can make it available in an ephemeral shell by typing one of the following:
nix-shell -p dotnet-aspnetcore
nix-shell -p dotnet-netcore
nix-shell -p dotnet-sdk
nix-shell -p dotnet-sdk_3
nix-shell -p dotnet-sdk_5
nix-shell -p dotnetCorePackages.aspnetcore_3_1
nix-shell -p dotnetCorePackages.aspnetcore_5_0
nix-shell -p dotnetCorePackages.runtime_3_1
nix-shell -p dotnetCorePackages.runtime_5_0
So, I have a ghost dotnet in here
b0ef $ ~ >
ls /nix/store/3axaxgbragp3zhb20i2swfqdwdnl1b3v-dotnet-sdk-6.0.300/bin/
dotnet
b0ef $ ~ >
/nix/store/3axaxgbragp3zhb20i2swfqdwdnl1b3v-dotnet-sdk-6.0.300/bin/dotnet
Usage: dotnet [options]
Usage: dotnet [path-to-application]
Options:
-h|--help Display help.
--info Display .NET information.
--list-sdks Display the installed SDKs.
--list-runtimes Display the installed runtimes.
path-to-application:
The path to an application .dll file to execute.
b0ef $ ~ >
/nix/store/3axaxgbragp3zhb20i2swfqdwdnl1b3v-dotnet-sdk-6.0.300/bin/dotnet --list-sdks
6.0.300 [/nix/store/3axaxgbragp3zhb20i2swfqdwdnl1b3v-dotnet-sdk-6.0.300/sdk]
b0ef $ ~ >
/nix/store/3axaxgbragp3zhb20i2swfqdwdnl1b3v-dotnet-sdk-6.0.300/bin/dotnet --list-runtimes
Microsoft.AspNetCore.App 6.0.5 [/nix/store/3axaxgbragp3zhb20i2swfqdwdnl1b3v-dotnet-sdk-6.0.300/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.5 [/nix/store/3axaxgbragp3zhb20i2swfqdwdnl1b3v-dotnet-sdk-6.0.300/shared/Microsoft.NETCore.App]
ok, wow, I still have that dotnet in there, even though I’ve also uninstalled omnisharp
b0ef $ ~ >
ls /nix/store/3axaxgbragp3zhb20i2swfqdwdnl1b3v-dotnet-sdk-6.0.300/bin/
dotnet
How can I figure out which package has pulled that down?