HACKER Q&A
📣 uticus

Current state of coding .NET code on non-Windows machines?


Does anyone have a good idea of how much .NET development is happening on non-Windows machines (or in non-Windows dev environments)?

I'm talking about the environment where code is written and debugged - not the environment where it is published or ultimately ran.

For example, I could imagine .NET back-end code being developed on Macs or Linux then deployed to AWS.

I enjoy the .NET language, but I much prefer a Linux dev environment over a Windows one (Ruby and occasionally others languages uses in the Linux dev environment). The release of Visual Studio 2022 for Mac has made me wonder how much demand there is for writing .NET code in a non-Windows environment. I also realize there are other alternatives, like JetBrains or VS Code.


  👤 billyhoffman Accepted Answer ✓
I do all my hobbyist development in .NET 5 on a M1 Mac using Visual Studio 2019 for Mac (now VS 2022) and then deploy to x86 Linux boxes on OVH.

I used to use the .NET runtime on Linux but now I just use a Make file to publish to self-contained Linux binaries and rsync them to the Linux boxes in prod.

I'm really enjoying it. Honestly the only (and biggest) problem right now is with TLS 1.3. .NET on Mac doesn't support TLS 1.3, even for their client Http classes like WebClient, because of some silly ways SslStream is implemented under the covers on macOS. There is more details in this issue: https://github.com/dotnet/runtime/issues/1979


👤 e3bc54b2
I only used it for few months as a beginner, so take this as you will.

VSCode works, but JetBrains Rider is probably your best bet. It just works and works really well compared to hodgepodge of extensions in vscode. Beyond these 2, you're pretty much on your own, and things never Just Work.

But, beyond the editor, the ecosystem is not Linux-friendly. A lot of libraries expect and assume you are on Windows and just refuse to work for whatever reason. There are near-zero relevant resources (blog posts, stack-overflow Q/As, forums) for developers on Linux. (I guess this is how Emacs users on Windows feel).

The second paragraph is why I stopped. The .NET core itself is decent, and if you manage to limit use within you should be mostly fine, probably. But the experience never feels home and it is a constant reminder of being second-class that's not my personal favourite way of spending life.


👤 headmelted
It's complicated.

There are a lot of things you'll miss coming from "real" Visual Studio.

VS Code is really a very good lightweight editor, but it's not trying to be an IDE.

Visual Studio 2022 for Mac is.. fine. It's a poor choice of name given that it sounds like a Mac port of Visual Studio, which it's not (it's MonoDevelop rebranded and updated with other features, but is still really far from VS on Windows).

I use JetBrains Rider quite a bit and I really quite like it, but even then, it's not close to matching Visual Studio + Resharper.

The features that you only really get to know on large projects or specific use cases are the ones that you'll miss the most in my experience, as it tends to be the blind spot for lighter environments.

IntelliTrace is a big one. There's nothing like it on any other .NET IDE that I can think of. Also the deep AppInsights integration has always been fairly incredible in VS and while VS Code has started to adopt some of this, it's still far from what's in VS.

The last thing I really miss is Snapshot Debugging. Having an exception being reported to you from live, being able to then click the exception on Azure and immediately pop a VS window with the debugger on the line that failed with a fully rewindable call stack as if it were running locally is magical for turning around bugs - most of the time you don't even need to try to trace the cause or recreate the circumstances at all.


👤 droobles
I just finished working on a .NET backend for a year and a half on mac w/ vscode, I found the experience to work pretty well. I did however choose to run a cloud windows VM to work with .NET Framework 4.7 libraries that needed to be integrated into the project, but after a few months worth of work I was back 100% on mac.

Unfortunately, if you have to reach back further than .net core or standard then you'll need to work in a windows environment – Cloud VMs are pretty cool and cheap if you don't want to use your hardware for a partition.


👤 kertoip_1
I'm using Rider on Ubuntu and it's perfectly fine as long as you are developing web-related stuff (WebAPIs, Blazor, MVC). Rider is much better IDE than Visual Studio, also dotnet is really terminal-friendly these days.

A year ago I needed to quickly do something related to Xamarin and as far as I remember I actually had to move to Windows for some reason, but that was the only time. I'm not even sure if it was related to inability to run stuff or it was just too much tinkering to launch that single thing.


👤 DimmieMan
Work on ASP.net core servers on Mac(Arm/M1) + Linux

.Net itself:

Everything builds and runs no problem, on linux I occasionally have to self install the latest SDK but that's a well known problem with many languages/platforms.

This is with the preface that I work on web servers, desktop right now is a no go with things like System.Drawing, printing etc. not being cross platform.

Tooling:

VS code is in a superposition of being an excellent free editor and a complete joke, it works but it's a long way from a great experience. Funnily enough this is a spot where F# support is better than C#.

Rider on the other hand has a great, near identical experience across all 3 systems.

Other notes:

I'm on Azure so I can't comment on the state of AWS SDK's (I would not be remotely surprised if they were better) and I find the emulator support lacking in general and especially on an M1 mac. This is an Azure problem rather than .Net but one i felt worth mentioning for other .Net developers.

To answer the start of your question: I think the bulk of .Net development going on is still on windows but that's definitely changing.


👤 UglyToad
I did a little development on Ubuntu back before Rider existed and switched back to Windows because I prefer it but now with Rider I think for any .NET Core shop the development platform is more or less irrelevant.

Almost everyone in our team uses Rider (except me and a couple of other holdouts) and the general consensus seems to be that it is far superior to VS. We completed a long migration over to Core and now we have developers on Mac (not sure on Linux) and we don't have a hard requirement on OS.

As for general numbers/market I think it's still relatively niche as any glance at a more start-up focused jobs board indicates (though not niche overall, just tends to be enterprises where dark matter developers are employed).

I hope one day people will realise what a fantastic ecosystem is available but for now they'll be bashing out messes in write-only languages and desperately carrying out microservices migrations to try and escape the pain when the project goes above 100LOC /s


👤 giulianob
I have coded on .NET in Windows/Mac/Linux. It works equally well in all environments. You can use VSCode, VS for Mac, or Rider. I use Rider in all platforms. It's an awesome IDE.

Source: I work at MS but have used .NET on other platforms at previous jobs.


👤 acedTrex
Half my team is using mac and the rest of us are begging for mac laptop refreshes to do our ASP api work, if that tells you anything. I consider the experience with rider on a mac to be far superior to windows based development.

👤 wilsonnb3
The vast majority of places that use .NET core (or .NET 5.0/6.0) are places that used to use old .NET and use Windows for their dev environments.

You would be really limiting yourself if you look for a .NET job without Windows. I am sure they exist but it's probably something like 95%/5% windows/not windows.

I am not really sure why you would want to use Linux/MacOS for this though. The dev experience for .NET is very consistent between platforms if you don't use Visual Studio.

Using VSCode, Rider, and the dotnet CLI, I have developed on MacOS, Windows, and Linux without noticing many differences.


👤 briandrupieski
I work at a startup using .NET Core and deploying to AWS.

It's a mix between Windows, MacOS, and Linux. When you join they ask if you have a preference between a Windows laptop or a MacBook.

The people on MacOS and Linux use either VSCode or Rider I believe.

Everything seems to run fine. It's kind of amazing to see, considering where .NET started.


👤 JamesBarney
Depends on where you're looking to work. If you're looking for startups there isn't a huge number of .NET startups. (I work for one) But the ones there are are usually ok with someone working on a Linux dev environment.

If you're looking for an enterprise job most non-tech enterprise companies still require development on a Windows machine because they require everyone to use a Windows machine.


👤 juice_bus
I have found JetBrain's Rider IDE[0] to be sufficient for development on Linux. It is not as heavy weight as Visual Studio but does bridge the gap of convenience that VS provides.

[0] https://www.jetbrains.com/rider/


👤 bonthron
I write F# on Linux with both Emacs and VS Code. Works really well. LSP, Iodine, Fantomas greatly improve the IDE experience.

👤 JamesSwift
Its fine, just don't use VS for Mac. VS Code or Rider is the only sane workflow IMO.

Cross compilation is just as good as Go, and they are just starting to have the ability to generate native code instead of a wrapped runtime.


👤 conradludgate
At work we have .NET6 running on both Linux and M1 dev laptops. We use JetBrains Rider as the IDE of choice. It works well, and we run it in production in our kubernetes cluster (on Linux, obviously).

👤 majkinetor
We develop ASP.NET REST APIs for big gov services and automate deployments using pwsh. Most of the team work on Windows and some on Linux. Some use VS, some VS Code and we have deployments on both Windows and Linux machines. Pwsh is used extensively on any OS. For build we use Invoke-Build cross platform pwsh build framework and for tests Pester. I can not recall we had some serious problems on those OSes.

Regarding performance, I am impressed.

The platform and language is top notch IMO. It look like MS is entirely new beast since Nadella took the ship.


👤 damselfly
Been developing my app (https://github.com/webreaper/damselfly) on an M1 Mac for the last 2 years, and a Macbook pro prior to that. Development experience is pretty good - been using VS for Mac 2022 since Sept 2021. As has been mentioned, there are some challenges around drawing stuff, but nothing that ImageSharp and SkiaSharp haven't covered admirably.

I wrote up my experiences of getting AI/face-recognition working cross-platform here: https://damselfly.info/face-recognition-in-net-the-good-the-...


👤 pipeline_peak
If you’re just doing light work, by all means, maybe even server side development.

I think you have to use Mono Runtime w/o Windows which has poor performance. But ofc if your production is in a Windows environment that matters little.

> I much prefer a Linux dev environment over a Windows one

I used to try and get everything running on Linux. Unless you have some political motive, it’s not worth going against the grain.

C# development is ideal in Visual Studio, I could look at Vs code more, especially its debugging, but I don’t think it comes close to VS.

I know Windows isn’t very cool. There’s no modular user environment, not very programmer friendly, but it’s such a small price to pay when faced against getting something to actually work.

Just remember C# maybe great and ever expanding, but it’s just a language, and an enterprise centered one at that. I’ve worked with C# professionally for 3 years.


👤 neonsunset
Moved to MBP 14" M1 Pro and never looked back! VS Code as fast prototyping and code writing tool, then Rider for debugging and performance work. Both work really well and it's insane how full system draw gets as low as 4W in dark environments when doing fully-fledged development. I strongly recommend this to anyone working with .NET as a back-end dev.

On the note, .NET 6 and Omnisharp fully support debugging both arm64 binaries and cross-platform debugging of the x86 ones. What's more, .NET 7 includes A LOT of improvements to arm64 codegen so the things will only continue to improve.


👤 JaggerJo
Developing in F# full-time (.NET 6) on MacOS (M1) using Rider as my IDE of choice. Works like a charm.

👤 philliphaydon
I’ve spent the last 3 years running manjaro ( and ubuntu ) doing .net dev deployed to windows and linux (arm64 on t4g m6g) on AWS.

JetBrains Rider. Been solid no issues. Hate going back to windows to do dev work.


👤 Kaze404
It works just fine on Linux. 2 years ago I wrote an application in .NET Core using Emacs on Linux and the whole process was seamless. I assume it's even better now, since it's been so long.

👤 pjmlp
Outside Windows, you are constrained to ASP.NET and CLI stuff.

Plenty of .NET workflows still rely on libraries that are Windows only, because they either depend on classical .NET Framework, Windows specific APIs or VS plugins.

Watch this week's BUILD about all the cool features to develop on Azure and Linux (WSL) with VS, and then check which talks still refer to other workloads.

Unfortunately Microsoft's management still considers VS4Mac and VSCode second class, and hinders FOSS efforts with such actions.


👤 f8o
I have been doing back-end development based on .net core/5/6 using Linux and Rider since ~2018. I had to switch to windows a few times due to corporate environment requirements. It happened again a few weeks ago. Fortunately Windows 11 + WSLg is stable and I'm running Rider inside it. Maybe I'll be running the IDE from Windows once Jetbrains release Rider's WSL support (or Jetbrains Gateway).

👤 smackeyacky
I use vscode on debian in my startup for .NET development. My experience has been great, but I get the feeling that since WSL2/Docker are available for Windows that there aren't many people like me outside of hobbyists.

A lot of bigger companies want to use things like applocker to secure any machine inside their network, which makes linux problematic.


👤 minimaul
I use Rider on a M1 Max Mac along with .NET 6 for professional and personal dev - it’s boring in that it works well.

Developed mostly on Mac, deployed to Linux hosts packaged in Docker containers.

The non-windows .NET ecosystem is quite strong, imo!

edit: my personal advice is not to use VS Code as I found the .NET/C# integration to be quite buggy.


👤 Shadonototra
Just like with Java/node.js, it works okay, but it is its own ecosystem

You'll need the runtime to run things where they are deployed, and it is a huge dependency

No debugger/profiler available on linux (except a commercial one from jetbrains)


👤 aliswe
Hi mate, Visual Studio is available for Mac, not sure about Linux. If you can get by with VS Code then you should be set.

Maybe Ryder is available in Linux? It should be just as good as VS.