
My primary goal of hacking was the intellectual curiosity, the seduction of adventure.
~ Kevin Mitnick.
To be honest, this one surprised me. Before I dug into it, I never thought that a .NET solution project could be compiled and run on Linux. In my mind, .NET was the Microsoft framework, and Microsoft meant Windows, and that was that. But as I checked the GitHub of dotnet-core, I found there were many ways to do it, and once you see the options, the whole thing starts to feel obvious.
🐒 The Mono Path
First is through Mono, which is a compatible open source alternative to the .NET Framework (the latter being proprietary to Microsoft). Mono has been around for ages, and it is the project that made “.NET on Linux” possible long before Microsoft officially embraced the idea. You can create WPF (Windows Presentation Foundation) forms using it and other UI intensive .NET projects, though full WPF support has always been the rough edge of Mono, so expect some things to behave slightly differently than on Windows.
Mono is sponsored by Microsoft, but it is unofficially supported. What that means in practice is that it is actively maintained and works well for most projects, but you will not find it in any official Microsoft support contract. If your project is heavily UI based and you want to keep your C# code, Mono is the path.
⚙️ The .NET Core Path
The other solution is for modern .NET development. If you are working on a .NET core project, you will be using dotnet-core. In 2014, Microsoft announced an open source .NET, and from that effort came dotnet-core, a stripped down version of the .NET framework without all the heavy UI and forms. The project itself is modular and can be compiled on different platforms, including Windows, Linux, and macOS.
Basically, it is everything that makes .NET useful for servers, APIs, and command line tools, with none of the desktop baggage. The first official release arrived in 2016, and since then it has become the standard way to build C# applications that are meant to run anywhere. If you do not need a desktop interface, .NET Core is almost always the better choice.
🐧 Installing on Arch Linux
So if you’re planning to use C# or a .NET dependent language, don’t be afraid, as it can be run and created using different platforms. If you’re planning to install the package on Arch, here is the command:
pacman -Sy dotnet-core
Or check the mono flavor:
pacman -Sy mono
Both packages bring the tools you need to start compiling right away, and the Arch repos keep them reasonably current.
🧠 Final Thoughts
That’s it guys, a brand new knowledge for me. For years I had assumed that .NET meant being locked into Windows, and finding out that the whole ecosystem had quietly gone cross-platform changed my mind about which tools I reach for next. Probably on my next project I’ll try to use .NET Core. 🤔 Hope you guys enjoyed this article and as always live life.