Rider cannot detect .NET core installation on Ubuntu

None of these worked for me. I am on PopOS and found a solution here shown in the below screenshot. I think in general it is still a bad idea to install anything from Jetbrains through the Snap store. I've had issues with Intellij and Pycharm as well dating back to ~2014 that were immediately resolved by not using the Snap store.

enter image description here


I managed to fix the issue setting

/opt/dotnet/dotnet

in

Settings | Build,Execution,Deployment |
  Toolset and Build | .NET Core CLI executable path

enter image description here

Previously, I was using /usr/bin/dotnet, but it doesn't work anymore. Also, auto detect seems to be broken.

Actually, /usr/bin/dotnet, the path returned by which dotnet, is just a shell file defering to /opt/dotnet/dotnet, as its content is:

#!/bin/sh

export DOTNET_ROOT=/opt/dotnet
exec /opt/dotnet/dotnet $@

# vim: ts=2 sw=2 et:

You can set up the path to .NET CLI in Rider settings: menu File* → SettingsBuild, Execution, DeploymentToolset and Build. But usually Rider should auto detect it.

Please check what you have dotnet in your PATH. Pay attention; you should restart Rider after installing the .NET Core SDK.


I was just experiencing this issue due to a botched install of Xamarin Android on Arch Linux and was able to resolve it by doing the following:

First execute dotnet --info to get the path of .NET Core SDKs installed:

.NET Core SDK (reflecting any global.json): Version: 2.1.500
Commit: b68b931422

Runtime Environment: OS Name: arch OS Version: OS Platform:
Linux RID: arch-x64 Base Path: /opt/dotnet/sdk/2.1.500/

Host (useful for support): Version: 2.1.6 Commit: 3f4f8eebd8

.NET Core SDKs installed:
2.1.500 [/opt/dotnet/sdk]

.NET Core runtimes installed: Microsoft.NETCore.App 2.1.6
[/opt/dotnet/shared/Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download

Up one directory at /opt/dotnet/ there should be an executable named "dotnet." The absolute path to this file (/opt/dotnet/dotnet) should be set as the .NET Core CLI executable path value under FileSettingsBuild, Execution, DeploymentToolset and Build settings in Rider.

Just in case, here are my other toolset configuration settings:

Mono executable path: /usr/bin/mono

Use MSBuild version: Auto detected (15,0), /usr/lib/mono/msbuild/bin/MSBuild.dll

I also have the following values added to my PATH in .bashrc due to an error I received regarding Razor not being found:

export MSBuildSDKsPath=/opt/dotnet/sdk/$(dotnet --version)/Sdks

export PATH=${PATH}:${MSBuildSDKsPath}

Tags:

.Net

Rider