.NET on Linux: What a Contrast
two-wrongs.com
two-wrongs.com
I prefer Rust or even Node/TypeScript myself, but have worked a lot in the .Net space since pre release in 2002.
JavaScript and typescript exist in a bizarre netherworld of not really being type safe and not really being type free. It makes for some truly strange code bases that reflect whatever is cool but none of it aged well.
Npm is hideous. Dreadful. It’s a daily struggle especially if you have to deal with private repos (azure specifically).
C# is just a better language. Better, more expressive collections and a type system that has consistency. EntityFramework for databases is fantastic, node has nothing remotely as good.
.NET and Nuget are a breeze. I would go as far as saying Linux is the superior experience when programming .NET since you spend a lot of time with the CLI and power shell sucks.
*PS core is the one based on the new versions of dotnet.
If it's a simple script, bash is in the box... If it's more complex, I'll reach for a more rich scripting platform.
It has been very useful to me to use as a REPL on my own C# libraries, I can instantiate and use types from these libraries and interface with the file system and network on an ad hoc basis.
Powershell tries to be everything and ends up being too much, badly implemented. I have dabbled in it for Windows/Microsoft specific things (Outlook manipulation) but while you can write a PS script that tries to do something like delete all yesterdays mail with a particular characteristic, in practice it often doesn't work due to the impedence mismatch between COM and PS. I like the idea, I really do, but it's just not as straight up practical as the Unix tools.
I also like the expressiveness and productivity I get out of it. Though many of my issues with C# comes down to the culture in practice more than the language.
C# is better when you have more firm constraints and the coffee will be longer lived and worth the complexity. It's just the difference between a script and a full program/application with all that involved in the Net space.
My point was mostly that. Net is still pretty good for things in Linux even without a blessed, official desktop UI framework.
https://github.com/jsuarezruiz/maui-linux/blob/main-linux/RE...
What about Java or Go? You could say they do ignore Linux as well...on the grounds of not having nice to use first-party crossplat GUI framework that can target Linux. Where are the OracleUI or GoogleGoUI?
Beats me how this kind of thinking works, always excuses instead of evaluating the technology on its merits and the experience it offers. Sometimes I feel like it's the community that actually hinders the transition towards more decentralized FOSS-style ecosystem (on this website it is more likely to be simply bad faith arguments).
p.s.: I'm daily driving Ghidra currently which is built with Java Swing and it looks like straight out of 90s in a bad way haha
On a tangent and I also don't know how others would view this, but I personally think that trivial desktop applications have or will have moved on to solutions like (but not exactly server-sided) Phoenix Liveview or Blazor Server. No real need to bother with multi-platform solutions when there's already one the end user uses daily and is battle tested. The case of applications needing the usage of a GPU likes games aside that is.
> p.s.: I'm daily driving Ghidra currently which is built with Java Swing and it looks like straight out of 90s in a bad way haha
I don't know, I have a fondness of that old ass style of GUI lol
JetBrains IDEs and Netbeans are powered by Swing.
I do agree what kqr mentions in the blog post, that the state of .net wasn't really that great during the core era (especially during 1-3). But after hitting .net core 3.1 things really took a turn.
And now with .Net 8 (note that core is not part of the naming anymore), things are looking great.
The two things which lags behind in both experience and is still UX related.
MAUI was meant to be this super cool new UX tech, which would save us from electron. But it never happen, and may never do it in the future either.
The second one is Blazor. It's such a mixed bag of what the experience is. Sometimes it's so seamless and nice...and then you hit some weird LSP stuff and away goes type checking, hinting and syntax highlighting. But there is hope ig guess.
If you're interested in writing C# and .Net code on a Linux machine. Then wait no further. VS Code (with .Net dev kit extension) works great.
And if you're like (which prefers neovim), things are pretty good as well. Just don't expect to have a good experience with razor pages and/or blazor (when using Neovim instead of VS Code).
Unless you're writing Roslyn source generators. You can only debug them with (non-code) Visual Studio on Windows in my experience. Rider does not work well either.
I’d advise using Jet brains Rider for serious C# development (on both Linux and Windows). It’s a serious competitor to Visual Studio (and is vastly superior to VS Code)
But my guess it's still faster in Rider
"C# Dev Kit builds on the same foundations as Visual Studio for some of its functionality, it uses the same license model as Visual Studio. This means it's free for individuals, as well as academia and open-source development, the same terms that apply to Visual Studio Community. For organizations, the C# Dev Kit is included with Visual Studio Professional and Enterprise subscriptions, as well as GitHub Codespaces."
Instead it is either Electron or Java/Kotlin, in both cases commercial licences (new VSCode plugin has different licence levels).
They don’t. Microsoft makes products for companies who will pay for software.
Several CMS on the .NET ecosystem that relied on .NET for their plugins, when they went headless, decided to focus on supporting Next.js and friends for their UI component layer, removing Web Forms, MVC, Razor Pages support for these kind of workflows.
Others, like Sitecore, decided that it was too much code to rewrite from .NET Framework to .NET Core, and not only refocused on Next.js with Vercel agreements, they also pivoted for an API first approach, and acquired non-.NET based products as means to evolve their product roadmap away from .NET.
Myself, I have been involved in a couple of .NET Framework to Java migration projects, as given some of the stuff the customers would need to write from scratch in modern .NET, they decided it was the right time to move away from Microsoft stack on the server infrastructure.
It should be noted that it isn't an accident that Microsoft, after all these years, has acquired jClarity and is now an OpenJDK contributor.
Who have thought to see this kind of stuff a few years ago?
https://devblogs.microsoft.com/java/
https://www.theregister.com/2024/01/31/microsoft_seeks_rust_...
It basically dead ended the large million line app that ran the company I worked for and forced a costly rewrite away from Microsoft. Though many parts of it still exist today, still on 4.8.
For a company, Microsoft, that prizes backward compatibility and typically provides good upgrade paths, I felt very betrayed having trusted them as our platform.
Their documentation even says, "Updating an app from ASP.NET Framework to ASP.NET Core is non-trivial for the majority of production apps" Even that is an understatement. https://learn.microsoft.com/en-us/aspnet/core/migration/inc/...
Swapping out the startup and hosting models was not a challenge because the APIs were comparable, some controller classes had no lines changed either, and moving off IIS pool arguably is all around improvement (and far easier, to manage with docker and deployment manifests).
Microsoft's scenario for non-Windows is clearly driven by Azure and mobile platforms.
VSCode development experience is only done to be good enough to drive people into VS proper, as it has already been confirmed in a couple of podcast interviews, that there is no plan for feature parity.
So if one wants feature parity with VS outside Windows shelling out money for Rider is the only option.
Ironically Java still wins out in tooling, not only is InteliJ community free beer, there is Eclipse and Netbeans, while Red-Hat in collaboration with Microsoft, makes most of headless Eclipse run on VSCode, a much better experience than .NET on VSCode.
Even the Python experience on VSCode is better.
Additionally none of them have "pro" features gated by license, as in the .NET VSCode plugin.
It feels like while .NET team tries to turn the ecosystem around into FOSS, management ie still pretty much into VS/Windows/Azure, with some carrots for other scenarios.
Certainly for me C# is “the Unity language.” I’m dimly aware that it has some vague Microsoft association, but I don’t think I’ve even seen a piece of MS tooling for it in…many years. Unity + JetBrains Rider has been a pleasant gamedev environment.
It's unfortunate that they're still stuck on their old fork of Mono, because Microsoft's tooling (and their runtime) is really good. You can write a C# game in Godot now and seamlessly use the Visual Studio debugger without any janky plugin.
Didn't they switch to .NET Core years ago? Of course for many platforms you have to use their CPP transpiler which complicates some things that might be possible in normal C#.
Unity currently does not support .NET (Core) at all.
Most modern large games use IL2CPP, the C++ transpiler; it's a requirement on iOS, nearly a requirement on Android, and almost certainly a requirement on consoles. Perf is often nicer and it's harder to mod/hack, which some devs like.
Sibling poster notes different .Net compatibility settings. Modern Unity versions allow you to be in either .Net 4.6(ish) mode or .Net Standard 2.0/2.1 mode. The latter comports more with Core's APIs, though is pretty old at this point.
And, since we're on similar topics, Unity currently supports C# 9.0, minus a few minor features[1]. This is a massive improvement compared to a few years ago, where we were stuck with C# 4 or 6, and means you can write pretty modern and performant C#. Especially notable is Span support, a way of representing (basically) non-owning array slices.
[1] https://docs.unity3d.com/2023.3/Documentation/Manual/CSharpC...
Nowadays DirectX team doesn't even bother to shy away from it, it is up to Unity or other third parties to provide bindings to .NET.
Compare this with Swift bindings to Metal, or Java ones to OpenGL ES (Android might also get WebGPU bindings to Java, lets see what Android 15 brings).
I'm kind of happy as a clam.
I know that MS Visual Studio is a lot nicer for C# development. But yeah, I'm really enjoying having this cloud code environment available from anywhere.
I'm using code-server as a dumb text editor, akin to using notepad.exe back in the day.
But I'm honestly very comfortable with that. Especially for the kind of code I'm writing.
They have had all this working for over a decade.
If only the madness of post Borland had not been so complete.
And I've tried them all. Win32, MFC, Winforms, WPF, Qt, Gtk, WxWidgets, Fltk, Swing, JavaFX, Flutter, React, Angular, Svelte, Solid...
But desktop development is dead, unfortunately. And Delphi is too expensive. They should take a look at Jetbrains on how to successfully sell licenses to individuals...
Unfortunately, some giant idiotic enterprisy choices were made at a corporate level, setting off a sequence of disasters.
A true tragedy in slow motion of decades.
C++/CLI and C++/CX never had that kind of support on Microsoft, even though they get associated with having pushed C++ on the industry (ironically given that it is a Bell Labs UNIX born language, and they were the last PC compiler vendor to support it).
Even MFC never was as good as OWL/VCL.
One of the most interesting and nicest outcomes of this has been wsl2, which has made Linux development in enterprises available, and palatable to policies and security requirements. While keeping that nice seamless experience. Without it my only choices were a mediocre experience directly on windows with its odd choices, or a mediocre experience with "we have UNIX at home" on macos with its handwaved away deficiencies.
I'm not sure I could go back to using Windows without it... I'm fine running Mac or Linux though.
Serious question.
Just don't use MAUI, in favor of anything else?
It also comes with a slew of new bugs : )
Avalonia is perhaps closer to Flutter.
Honestly I still love WPF (perhaps it's Stockholm syndrome). Obviously WPF only runs on windows desktop though.
>The job, a principal software architect for Microsoft 365, has responsibilities that include "guiding technical direction, design and implementation of Rust component libraries, SDKs, and re-implementation of existing global scale C# based services to Rust."
> guiding technical direction, design and implementation of Rust component libraries, SDKs, and contributing to the building of global scale services in Rust.
Maybe the article misquoted it. Maybe the posting was updated after the article. The only time C# shows up is on the required qualifications section.
I'm not expressly opposed to electron like some, but I think efforts closer to native should be made more often.
Avalonia is developed outside of the Microsoft corporate madness and seems to be slowly becoming the defacto cross-platform framework because it is expected to last a bit longer than a manager's attention span: https://avaloniaui.net/
Web-based electron apps are not .net apps and that’s what we are talking about here.
They do a great job. Just...not at that.
I'd rather just have a, Material or Fluent UI in either , the latter being current windows design style.
They've both changed so much over time along with a mix of applications applying different design styles all around.