Rider unable to detect .Net Core but dotnet command shows correct info
Rider (2022.2.2 Build #RD-222.3962.23, built on August 20, 2022) is unable to locate my .Net Core install, even though dotnet --info shows that it exists and that my Rider settings should be using the correct filepaths for it.
OS: Kubuntu 22.04
I had installed dotnet-sdk-6.0 package.
I had mono installed previously but I had now uninstalled it and I should just have dotnet and .Net Core 6 installed now.
Bit stuck on what to do next or how to fix this. Any help appreciated.
Please sign in to leave a comment.
Hello, you say Rider is unable to detect .Net Core meaning you are unable to load/build a solution? Does it fail with an error? How Rider was installed?
It appears to build a tutorial project I was following, but it will not run it.
Install of Rider was from the Linux tar.gz file from the JetBrains website, and extracted to /opt/JetBrains/rider/ which is where I run it from.
The same install procedure was followed on my Laptop, which seems to run the web app project (there's an exception about ssl that I need to fix but it doesnt seem to be a Rider issue). The output of dotnet --info is the exact same as the one on the desktop.
It could be that something is being muddled on my Desktop about mono / dotnet, but surely Rider would pick up the settings from the dotnet path I set it to use, and would ignore any leftover installs of other .net libraries?
I see, but does it work if you try to run it with dotnet run? Does it work if you try creating a simple template console project and try to run it?
Hi.
Running 'dotnet run' on the command line works, as evidenced in the screenshot below.
I can load this new console project once I setup the project to use the correct path for dotnet command + the filepath to MSBuild.dll (neither are auto-detected). Once that is done, I can then build the project within Rider, but I still cannot run the console app within Rider.
The new console app, no .Net detected until I setup the path to dotnet and the MSBuilld.dll - once this is done, the project loads and builds, but will not run:
A new console project, runs fine in command line:
Original project, running fine in the console:
And below you can see the new console app building fine in Rider now that the dotnet and MSBuild.dll paths are set. It just wont run from Rider.
And running fails:
I see, could please enable Trace scenario for Run via Help | Diagnostic Tools | Choose Trace Scenarios, reproduce the issue, collect the logs after via Help | Collect Logs and send a resulting bundle to us with a new issue on our tracker. It will help us to get a bit more information on what is going on.
Thanks. I created RIDER-82361, hopefully the logs will show enough detail.
I had same problem (on Windows). Updated version of .net in global.json in env:USERPROFILE path
solution for me was to set the environment variable DOTNET_ROOT=/usr/share/dotnet
to make this persist, i created the below file:
cat /etc/profile.d/dotnet-fix-per-dotnet_runtime_gh_79237.sh
#!/bin/sh
DOTNET_ROOT=/usr/share/dotnet
export DOTNET_ROOT
you can read more on github.com/dotnet/runtime/issues/79237
I work with Rider Version 2023.3.2 on Windows 10 and installed the .NET 8 SDK via Rider.
And faced the same issue try to build and deploy a lambda function to AWS with the SAM scripts.
The solution for me was also to add the environment variable DOTNET_ROOT and let it point to => %USERPROFILE%\.dotnet