'Linux JetBrains Rider can't use Mono, while it is installed in the system

I am currently using Manjaro Linux 20.2, with official JetBrains Rider from JetBrains Toolbox

I have installed this package package screenshot

When I'm writing in my terminal "mono" it runs. File location also looks fine.

When I'm opening my Environment tab in Rider. I got this. Environment Tab

I can create and run/execute/debug any projects with my .NET CORE

But I can't use the framework at all. A simple application like this New Project Window

And here... the error

In my settings -> build and execution -> I have these parameters path settings

I don't know what to do and how to fix this error. Tried many times disinstall/reinstall the Mono Package. But it's always the same. Maybe I should change somehow a Mono path here in Rider Settings ? But I don't know to where.. there are so many of these files in usr/lib and usr/bin

Please help me, I don't know what to do next and how to fix this.. I just know for sure. That it is possible to run Mono on UNIX. Something is wrong..

UPD1: I've discovered, that to run Mono on Linux. I should install a different package "monodevelop"

But according to GitHub, this package is not build-able on Linux anymore (only on MacOS) In fact..

I've discovered this "dotdevelop" package.. https://github.com/dotdevelop/dotdevelop But I don't know, it's looks like it doesn't work for me either. Or maybe I'm just putting a wrong file to my mono path settings in Rider..

UPD2: Maybe there is still hope for me, if I'll use .NET FRAMEWORK from inside a container ? https://hub.docker.com/_/microsoft-dotnet-framework

I know how to use Docker. It will be possible to use it in my Rider ? I don't get it.



Solution 1:[1]

You should create a console application by choosing "Console Application" under ".NET Core".

I wonder why Rider guys decided to show the projects under ".NET" to mess things up. Beginners like you won't be easy to know what they are and how to run them on non-Windows machines.

Solution 2:[2]

This answer essentially has what you're looking for. There is an issue in recent mono packages for some distributions that causes Rider not to have a proper reference to the mono libraries.

JetBrains Rider not detecting mono or Unity API

I've tried this on Debian 11 and it works as expected. I also use an Ubuntu machine and I didn't have to do this. I'm not entirely sure why, all I know is that some distros need the override set in in order to work. I use KDE Plasma and used their method of setting environment variables. There's a million ways to do that, check Majaro's documentation for what's best for your system.

As for the other comment that there is no .NET Framework on Linux, that's not completely true. Mono is the .NET Framework implementation for Linux and macOS. It supports a large portion of the .NET Framework that exists in the Windows version, however it has some drawbacks.

For instance, WinForms is only partially supported and extremely buggy. WPF will not work at all.

ASP.NET can be run under Apache with a plugin, however it doesn't support all of the frameworks that you can use on Windows. For modern .NET web development on non Windows platforms, .NET 5+ should be used.

Another weird one is that the Console.Beep() method works unreliably. The Console.Beep(int frequency, int duration) method also doesn't work on macOS at all.

Other than those examples, there's other things that won't work which are mainly things that rely directly on the Windows API though it's possible to run .NET in some capacity under WINE. This isn't recommended though. Anything that uses COM will not work as well. It's also practically impossible to use a printer so that's probably out.

You can review https://www.mono-project.com/docs/about-mono/compatibility/ for a better list of what is and isn't supported.

For console applications, mono works quite well. Just be aware that not everything will work.

Good luck!

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Lex Li
Solution 2 trademarq