Published on

Using .NET on Linux

Authors

But why?

The last 2-3 years running Windows has been a dreadful experience for me. I faced constant instability issues, leading me to reinstall the system 8-10 times during that period. On top of that, the fact that you can’t install Windows 11 without signing into a Microsoft account is a real turn-off. Sure, there are ways around it if you're technical, but should it really be necessary?

Windows feels increasingly bloated with ads, popups, suggestions, and excessive telemetry being sent to Microsoft. It all makes me want to distance myself from the platform.

Of course, this is my personal experience, and yours might differ, but this is how I ended up here as a .NET developer running Linux. After all, isn’t Windows the obvious choice for .NET development?

Saying goodbye to my old friend (Visual Studio)

Saying Goodbye to My Old Friend (Visual Studio) There’s no denying that Visual Studio is an awesome IDE. For many, it offers one of the best development experiences in .NET. So, why leave it behind? Simple: Visual Studio DOES NOT work on Linux. We won’t dive into the obvious reasons why, or why it likely never will.

But what are the alternatives on Linux, and are they even viable? Can they truly provide a solid development experience comparable to what Visual Studio offers? That’s what I had to figure out.

Rider to the Rescue

Many of you might be familiar with JetBrains, which has provided extensions for Visual Studio over the last 20 years that have significantly improved the IDE. JetBrains has developed its tools on the IntelliJ platform and now offers superb IDEs for multiple languages and ecosystems.

For .NET development, Rider is the go-to choice. It can be installed on Linux and provides all the features we love from ReSharper, minus the sluggishness that often comes with it on top of Visual Studio. I can confidently say that transitioning from Visual Studio to Rider was one of the least painful aspects of moving from Windows to Linux.

I’ll dive deeper into Rider in another post, where I’ll explore its features and compare it to Visual Studio. You should try out Rider on Windows. The experience is exactly the same on Linux.

Installing .NET and the .NET CLI

Installing the .NET SDKS is straight forward. This guide provides multiple options for installation. I typically choose the Scripted install method. I will go through the process in a future post.

The .NET CLI functions just like it does on Windows, providing the same capabilities and features. This is fantastic, as it means I don’t feel left behind while working in Linux. The consistency in functionality allows for a smooth transition and a familiar experience across platforms.

But what about the Classic(Good old) .NET Framework?

If you still need to support Windows applications (which makes up about 10% of my work), there are a few options. Dual booting is one approach, but it can be a hassle to switch between desktop environments. Instead, I created a Windows 10 virtual machine using GNOME Boxes. I allocated 20 GB of memory and 12 cores to the VM since I’m running a 7900X with 24 cores and 64 GB of RAM. This setup works well for maintaining old .NET solutions while using Linux as my daily driver. You could even manage with 8 GB of memory and 4 cores if needed.

This was a brief introduction to my initial experience with .NET development on Linux. I plan to cover more topics in this area, sharing insights and tips based on what I've learned along the way. Stay tuned for more posts!