Running C# on Linux
In this article we'll discuss running C# on Linux.
Is it even possible? Yes, and you can do this using:
- .NET Core (except for GUI applications, currently no WPF available),
- Mono (Gtk# for GUI apps).
Install the SDK
The first step you need to take to run C# applications on Linux is to install the SDK.
The official documentations containes up-to-date commands that you can use.
Please refer to https://learn.microsoft.com/en-us/dotnet/core/install/linux-ubuntu#2104-.
Install the IDE
Two commonly used IDEs for Linux are:
- Rider (mostly for ASP.NET Core),
- Visual Studio Code (good for console apps).
To use C# in Visual Studo Code you need to install a proper extension. You can find the instructions at https://code.visualstudio.com/docs/languages/csharp.
If you're interested in building GUI applications on Linux using GTK#, go ahead and visit https://www.mono-project.com/docs/gui/gtksharp/ for more information.