Rider ignores mise environment and hard-defaults to system .NET SDK /usr/bin/dotnet (Arch Linux)
Hi everyone,
I am running into a frustrating toolchain resolution issue on Arch Linux.
The Context: I use mise (similar to asdf) to manage my .NET versions per project (specifically .NET 9). Recently, I installed the godot-mono package via the system package manager, which pulled in .NET 8 as a hard dependency and placed it in /usr/bin/dotnet.
The Issue: Since that system-wide installation, Rider refuses to use my mise environment consistently for my regular C# projects.
Interestingly, there is a weird discrepancy: The Build process actually respects the mise environment and compiles the project correctly using the local SDK. However, when I Run or Debug the application, Rider completely ignores the local environment and falls back to the system-wide .NET 8 runtime from /usr/bin/dotnet.
What I've tried (and failed):
- Launching Rider directly from a terminal where the
miseenvironment is fully active andwhich dotnetpoints to themisepath. - Setting
DOTNET_ROOTto themiseinstallation path. - Adding the custom PATH explicitly to
launchSettings.json.
None of these force the Run/Debug configurations to respect the local environment. It seems Rider's execution runtime prioritizes the default system path over user-injected variables, even though MSBuild evaluation works fine.
Is there a specific setting in Rider (or a Registry flag) where I can explicitly point the Run/Debug configuration to the mise .NET executable, or force it to respect the shell's $PATH priority?
Thanks!
Please sign in to leave a comment.
Hello,
What do you have under File | Settings | Build, Execution, Deployment | Toolset and Build as “.NET CLI executable path” and MSBuild version? Does it point to the mise installation, or to the system one?
What you can try is to experiment with the Run Configuration (Run | Edit Configurations):
Or for the specific run configuration, select proper dotnet executable in the Runtime field:
Tell me how it is going. Have a nice day!
Hi,
Thanks for getting back to me with those suggestions.
Regarding your questions, here are my findings:
1. Toolset and Build Settings:
My settings under
File | Settings | Build, Execution, Deployment | Toolset and Buildare actually correctly pointing to themiseinstallation. The.NET CLI executable pathandMSBuildare detecting the localmiseenvironment properly.2. Run Configuration Workaround:
I followed your suggestion and experimented with the Run Configuration (
Run | Edit Configurations). As you can see in the second attachment, I have explicitly:Environment variablesto inject themisePATH.Runtimefield to explicitly point to themisedotnet executable (/home/manhtq/.local/share/mise/dotnet-root/dotnet).The Result: Unfortunately, it is still not working. Even with these explicit manual overrides in the Run Configuration, the application fails to run correctly using the local environment. Here is the console output:
Thanks!
Thank you! Now I see. I reproduced the same problem on my end. I assume this is a bug: I registered this: RIDER-139472 Rider ignores mise-installed dotnet and uses system one, despite everything is set to use the mise-installed those . Development team will take a look.
I mentioned a couple of wokarounds. I found no other way to make it work. For some reason, Rider wrongly uses the dotnet installation that appears comes with `godot-mono` package.
Hope that helps!
Thanks a lot for reproducing the issue and creating the ticket! Appreciate the help!