sdk: .NET tool does not seem to find the SDK
Hi. It may be not the best place, but here’s a problem/question. I’m trying to run fsautocomplete
, a .NET tool, and getting
$ fsautocomplete
You must install .NET to run this application.
App: /home/goose/.dotnet/tools/fsautocomplete
Architecture: x64
App host version: 7.0.0
.NET location: Not found
However, SDK exist:
$ dotnet --list-sdks
6.0.403 [/nix/store/4j4w9b1a9n54zmdrvfwhcsxgwsb3k1qq-dotnet-core-combined/sdk]
7.0.100 [/nix/store/4j4w9b1a9n54zmdrvfwhcsxgwsb3k1qq-dotnet-core-combined/sdk]
As well as runtimes:
$ dotnet --list-runtimes
Microsoft.AspNetCore.App 6.0.11 [/nix/store/4j4w9b1a9n54zmdrvfwhcsxgwsb3k1qq-dotnet-core-combined/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.0 [/nix/store/4j4w9b1a9n54zmdrvfwhcsxgwsb3k1qq-dotnet-core-combined/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.11 [/nix/store/4j4w9b1a9n54zmdrvfwhcsxgwsb3k1qq-dotnet-core-combined/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.0 [/nix/store/4j4w9b1a9n54zmdrvfwhcsxgwsb3k1qq-dotnet-core-combined/shared/Microsoft.NETCore.App]
$DOTNET_ROOT is defined as well:
$ echo $DOTNET_ROOT
/nix/store/4j4w9b1a9n54zmdrvfwhcsxgwsb3k1qq-dotnet-core-combined
and points to the correct location.
Moreover, dotnet run
works in a sample project. But the .net tool won’t start.
What other places or env paths do the nuget packages look for, besides $PATH and $DOTNET_ROOT?
About this issue
- Original URL
- State: open
- Created a year ago
- Reactions: 3
- Comments: 18 (4 by maintainers)
I do, the only thing that changed is my
nixpkgs
flake input. And as you can see above,dotnet --list-sdks
even finds the SDK. It’s justdotnet format
that fails.Out of curiosity: Does
dotnet format
work for you? It started failing for me after I updated nix flake inputs (including .NET SDK):With this SDK version
dotnet format
works fine for me:And this is the version where it fails:
I haven’t tried any versions in-between.
Ok so I did something, that both .NET and Nix people are gonna hate me for
But here’s what my fellow Nix people can do to use local
fsautocomplete
as a global tool(.NET SDK team on their way to eat me for that)