(评论)
(comments)

原始链接: https://news.ycombinator.com/item?id=41371106

2000 年代初,开源 Mono 项目旨在为被 Microsoft 忽视的平台(例如移动设备和替代 Linux 架构)创建 .NET 兼容运行时。 然而,随着微软收购Xamarin,继续开发.NET,并创建.NET Core,Mono的必要性显着下降。 虽然它继续支持 .NET Core 不切实际的旧情况(例如 WINE 和选定的 GNOME 应用程序),但 Mono 的开发由于共享库冲突而减慢。 如今,它主要存在于 WINE 中,非常适合其作为可移植 CLR 运行时的角色。 可用于 .NET 的流行图形用户界面 (GUI) 库主要仅适用于 Windows,这表明当前 GUI 框架(例如 Win32、XAML 和 MAUI)的局限性。 随着最近的进步,.NET Core 和第三方 GUI 库似乎成为跨平台 .NET 开发的首选。 随着时间的推移,.NET Core 已得到更广泛的采用,并且已接近完成,与以前的 .NET 迭代相比,在性能和易用性方面有了显着改进。 对于使用过时 GUI(例如 Silverlight/Blend、XAML 或 WPF)的旧版 .NET 应用程序,强烈建议迁移到现代 .NET 技术。 然而,Debian 不支持 .NET Core,可能是由于许可问题或缺乏对所有 Debian 架构的支持。 最后,.NET 中的微控制器支持仍然相对未经探索,目前可用的选项很少,例如 NanoFramework、Meadow、bflat 和 Zerosharp。

相关文章

原文


I worked on Mono a lot back in the early 2000s (back in the SVN days before it moved to Git, even). This move makes a lot of sense. Things evolved a lot over the years. Mono's legacy goals, which are to be a portable CLR (.NET) runtime for platforms that Microsoft didn't care about, don't make much sense today.

Mono made a lot of sense for running places where full .NET didn't, like in full AOT environments like on the iPhone where you can't JIT, or for random architectures that don't matter anymore but once did for Linux (Alpha, Itanium, PPC, MIPs, etc.). When Microsoft bought Xamarin (which itself was born out of the ashes of the Novell shutdown of the Mono effort) and started the DotNET Core efforts to make .NET more portable itself and less a system-provided framework and merge in a lot of the stuff Mono did a single more focused project made more sense.

Mono was still left out there to support the edge cases where DotNET Core didn't make sense, which was mostly things like being a backend for Wine stuff in some cases, some GNOME Desktop stuff (via GTK#, which is pretty dead now), and older niche use cases (second life and Unity still embed mono as a runtime for their systems). The project was limping, though, and sharing a standard library but different runtimes after much merging. Mono's runtime was always a little more portable (C instead of C++) and more accessible to experiment with, but we need that less and less, but it's still perfect for Wine. So, having it live on in Wine makes sense. It's a natural fit.



Is there somewhere where someone new to the ecosystem can get a simple introduction to all of these different terms and which ones are still relevant today? I looked into .NET somewhat recently and came away with the apparently mistaken impression that Mono was how .NET did cross-platform. I guess I must have been reading old docs, but I'm pretty sure they were at least semi-official.

Is there good documentation somewhere for getting set up to develop with modern .NET on Linux?



For modern .NET, you don't need to know anything about the legacy terms of Mono, .NET Core, .NET Framework, .NET Standard, etc. All you need is .NET 8 SDK. It's fully-cross platform and installs support for both C# and F#.

For example, just download .NET 8 SDK on whatever platform, which is usually very easy on most platforms, and then run `dotnet fsi` to get into an F# REPL.



This is from Mint 22. MS does have its own PPA though.

$ apt search dotnet

p dotnet-apphost-pack-6.0 - Internal - targeting pack for Microsoft.NET p dotnet-apphost-pack-7.0 - Internal - targeting pack for Microsoft.NET p dotnet-apphost-pack-8.0 - Internal - targeting pack for Microsoft.NET p dotnet-host - dotNET host command line p dotnet-host-7.0 - dotNET host command line p dotnet-host-8.0 - .NET host command line p dotnet-hostfxr-6.0 - dotNET host resolver p dotnet-hostfxr-7.0 - dotNET host resolver p dotnet-hostfxr-8.0 - .NET host resolver p dotnet-runtime-6.0 - dotNET runtime p dotnet-runtime-7.0 - dotNET runtime p dotnet-runtime-8.0 - .NET runtime p dotnet-runtime-dbg-8.0 - .NET Runtime debug symbols. p dotnet-sdk-6.0 - dotNET 6.0 Software Development Kit p dotnet-sdk-6.0-source-built-arti - Internal package for building dotNet 6.0 So p dotnet-sdk-7.0 - dotNET 7.0 Software Development Kit p dotnet-sdk-7.0-source-built-arti - Internal package for building dotNet 7.0 So p dotnet-sdk-8.0 - .NET 8.0 Software Development Kit p dotnet-sdk-8.0-source-built-arti - Internal package for building the .NET 8.0 p dotnet-sdk-dbg-8.0 - .NET SDK debug symbols. p dotnet-targeting-pack-6.0 - Internal - targeting pack for Microsoft.NET p dotnet-targeting-pack-7.0 - Internal - targeting pack for Microsoft.NET p dotnet-targeting-pack-8.0 - Internal - targeting pack for Microsoft.NET p dotnet-templates-6.0 - dotNET 6.0 templates p dotnet-templates-7.0 - dotNET 7.0 templates p dotnet-templates-8.0 - .NET 8.0 templates p dotnet6 - dotNET CLI tools and runtime p dotnet7 - dotNET CLI tools and runtime p dotnet8 - .NET CLI tools and runtime p libgtk-dotnet3.0-cil - GTK.NET library p libgtk-dotnet3.0-cil-dev - GTK.NET library - development files



> It's fully-cross platform

To a point. Making cross platform native desktop apps is still in the hands of 3rd party vendors such as Avalonia and Uno. MAUI was supposed to fix that oversight to a less than stellar results.



If there were an old version of C that only worked on one platform but had a graphical toolkit in its standard library, and a new version of C that is cross platform but that graphical toolkit is now ambiguously still sort-of part of the standard library but still not cross platform (and there was no realistic alternative)... Then yes it would be valid to object C is not really cross platform.



.NET/C#'s competitor JVM/Kotlin does provide a UI framework (Jetbrains Compose) that runs on iOS, Android, Windows, Mac, Linux, and the web.

That's what you have to compare against, and .NET/C# falls flat.



> Kotlin has replaced Java as C#'s largest competitor

Er, I don't think this assertion is backed by data. See for example https://pypl.github.io/PYPL.html

Is Kotlin the most "active", "hot", or "up-and-coming" competitor? Possibly. But the "largest"? Its deployed footprint and popularity are nowhere close to Java's at this point in time.



No and it's not even close. Kotlin only has a single Jetbrains Compose (I presume Kotlin Multiplatform is the same thing). It is also subject to the quirks and specifics of JVM implementations, build-systems and package management. Kotlin native partially bypasses this, but its performance is a factor of 0.1-0.01x vs OpenJDK (if there is new data - please let me know). This is very unlike NativeAOT which is on average within 90% of CoreCLR JIT but is also a performance improvement in variety of scenarios.

C# and F# get to enjoy the integration that is "much closer to the metal" as well as much richer cross-platform GUI frameworks ecosystem with longer history.



Which rich cross-platform GUI frameworks are you talking about?

Win32? Silverlight/Blend? XAML? MAUI? They're all windows only.

Gtk? Qt? Sure, they exist, but they're ancient and limited to long outdated paradigms.

I don't know if you can get QtQuick with KDE Kirigami to work on .NET, otherwise that might be one option.

Kotlin Multiplatform is btw a solution for building the same code for kotlin native, JVM and web to target all the OSes at the same time.

While Jetpack Compose is the Android Version of Compose, Compose Multiplatform is Compose for Kotlin Multiplatform.

> subject to the quirks and specifics of JVM implementations, build-systems and package management

That's a massive advantage over the arcane package management and build systems of .NET

Very few languages ever achieve a build and package management system as mature and usable as the Java ecosystem.

I've been waiting for 12 years for .NET to match Java's ecosystem, and it's still not there yet.



back when .NET was first launched it was advertised as the new way of making desktop applications on Windows. Visual C# made it very easy to design GUI interfaces.

So this "it's all for backend now" notion is surprising.



> Nowadays it sounds like .NET Core + third-party GUI libraries is the way to go.

For reference for those unfamiliar with the terms:

.NET Core was the name given to the cross-platform fork of the .NET runtime.

It was forked out of .NET 4.x and dropped support for a lot of things in the first versions.

It ran on various distributions of Linux and MacOS.

At the same time there were forks of other libraries/frameworks in the .NET ecosystem to have 'Core' variants. Often these were dropping support for legacy parts of their code so that they could run on Core.

Later versions of .NET Core brought over support for a many of the things that had been dropped.

.NET Core and .NET had stand-alone versions until .NET Core was renamed to . NET and became .NET 5.

So, if you want to do the most modern cross-platform C# you would use .NET 9.



More or less. any version of .NET >= 5 is cross-platform and is a direct descendant of the "Core" side of the fork, and so has no "full framework, windows only" variant.

It is "Core" in a lineage sense, but there's no need to make that distinction any more. The term "Core" is out of date, because the experimental "Core" fork succeeded, and became the mainstream.



I've been a long way from Windows development for a while, so missed that shift. I knew it was coming since moving functionality to the open source thing seemed to be Microsoft's target (with some skeptics doubting it, understandably). I didn't know it already happened.



The shift is slow, but it has been ongoing for years, and is pretty much wrapping up now. .NET 5 was released in November, 2020 and that was the "beginning of the end" of the shift over.

For what I do, it's not really "Windows development" in any meaningful way. It is business functionality with HTTP, message queues etc, developed on mostly Windows laptops, and deployed to mostly Linux instances on the cloud. Not that the host OS is something that we have to think about often.

For this, .NET 3.x "the full framework windows only version" services are regarded as very much legacy, and I wouldn't go near one without a plan to migrate to a modern .NET version.

However, YMMV and people are also making windows desktop apps and everything else.



It has always been, but for 20 years Microsoft used it as a way to maintain lock-in at the OS level.

They've now abandoned that strategy, and instead they use it as a way to maintain lock-in at the IAAS/PAAS level (Azure).



Minor nit: from what I understand dot net (core) is not a fork but rather a reimplementation / rewrite as far as I understand

> It was forked out of .NET 4.x and dropped support for a lot of things in the first versions.



Correct, the bytecode wasn't even 1:1 compatible. They then brought over missing pieces, and consolidated .NET Framework features into .NET Core, thus becoming just .NET to end the dumb naming war, since everyone calls it .NET anyway...



Good write up that wonderfully encapsulates how stupid Microsoft’s naming is - you didn’t even mention .NET standard.

I love .NET. It’s a great stack, especially for backend web apps. Blazor is a great SPA framework too. But I loathe how Microsoft continue to handle just about everything that isn’t the framework and C# / F#. It’s laughable.



Well, to be fair .NET Standard wasn't a framework, it was a standards/compatibility label and compilation target.

.NET Standard includes various versions of things that MS doesn't even touch.

I stopped doing .NET stuff before .NET 5 so I'm not hugely up to date with the latest shenanigans.



Oh don’t get me wrong - I wasn’t criticising your write up. It was concise and still relevant.

It’s just funny for newcomers to peel back the onion more. Writing a source generator? Target .NET standard 2.0 (not even 2.1) for a whole host of reasons.



The ".NET" label was applied to a bunch of things at Microsoft. It was also an early name given to their social networking / IM things.

But for the last 20-ish years it's really only been applied to things related to the .NET Framework.

So, yes - Visual Basic.NET is a language - it's the language that replaced Visual Basic 6. It compiles to the Intermediate Language (IL) that the Common Language Runtime (CLR) executes. There are other languages that compile to IL, too like C#, F#.

The .NET Framework is really a bunch of libraries and tools that are packaged together.

The .NET Standard is a standard that allows you to build a library to a known set of supported libraries and IL / CLR features.

So, yes, depending on which specific part you're referring to - it's all of those.



Among the other small nits in your otherwise concise post... the windows only versions of .NET (1-4) were known as .NET Framework. So, Framework is the only windows only version, followed by Core being a limited feature set but cross platform and then .NET 5 (no suffix) being a full featured version that is cross platform.



I'd argue that the dominance of Linux on cloud and Azure growing business is what's causing Microsoft to have an ongoing interest in linux support.

A factoid that's shared sometimes (no idea if true) is that Microsoft now employs more Linux kernel engineers than Windows kernel engineers due to Azure.



Off-topic but to join in the general good vibes this announcement emanates: i have to say that my experience using Azure cloud has been stellar. Their co-pilot integration works well, IME. Azure shell is simple and good. Dashboard UI is always good.

Bona fides: I have used GCP for 3 years, AWS for 3 years, and Azure for ~ 1 year. As well as the more "bare-metal" types of cloud providers like Linode/Akamai, and Vultr -- all the latter of which are great for self managing your infra.

I also really find the ability to spin up Windows Server and Windows 10/11 etc super useful for builds, testing, Hyper-V.

I really like Azure for huge projects with many moving parts.



That came after. Linux wasn't even on 2.6 with its famous stability yet when this kicked off. What you see now is a result. They softened on open source as they realized it actually has some benefits for a company like Microsoft.

The Microsoft of the Halloween Documents[0] is a different Microsoft from the one we see today that understands open source as something good rather than as a threat, and it started with Microsoft being forced to play nice.

"The cloud" as we understand it didn't exist yet.

[0] https://en.wikipedia.org/wiki/Halloween_documents



After having gouged Red Hat and Suse for years with their bogus Linux patent racket and bankrolling the infamous SCO Unix lawsuit. Make no mistake M$ coming over all We Love Linux was like Donald Trump turning up at the DNC.



I do remain skeptical that the node on the Microsoft org chart that usually strangles anything good the companies does is waiting to strike. It used to be Windows node, but now it seems like the ad node comes in for the kill most of the time. The company is slowly morphing into Google as Google morphs into Amazon, while Amazon is morphing into UPS.

Strange times.



Avalonia.

The UI isn't native, is a Skia canvass with drawn controls. But it'll work on basically every OS and it's pretty good.

Also, you're not writing JavaScript, so that's a win any day in my book.



No it's way better than Flutter. Avalonia really works on desktop.. :). Also the model is WPF so whoever know a little bit of legacy .NET framework will be able to write Avalonia apps in no-time



I really don't get the push of Blazor everywhere instead of its original WebAssembly target.

It is like the Web folks, that don't get anything else, are now pushing where .NET goes, mostly since .NET is now under Azure org chart.

I have done Web and native since "forever", not everything has to be for everything.



Yes. There are multiple UI projects that build on the WinUI 3 components in the Win App SDK.

There's the first party MAUI which is an updated version of Xamarin Forms. The two best-known third-party implementations are AvaloniaUI and Uno. I prefer Uno, it has more cross-platform targets.



(i hardly know what i'm talking about so somebody else may have a better idea, but i'm here now so)

mingw is a GNU's header/library environment (tools too maybe?) to create windows compatible applications. So I'd look into searching mingw .net and/or mingw mono.

also, ask your favorite AI, they're good at this type of question so long as it's not up to the minute news



Mono implemented the GUI stuff like Windows Forms, do the latest windows cross platform stuff support that? Can you run .Net GUI windows program on linux without Mono but using the latest .Net thing ? I know it was not possible in the past.



The whole point of .NET-Core was to remove all the (largely desktop-oriented) platform-specific dependencies that tied it to Windows, so you could run server-oriented .net programs on Linux. So no, afaik you can't simply run GUI apps built with .Net on Linux desktops - that's the reason Mono wasn't simply killed, because it covers that niche (which wouldn't even exist, were it not for Mono/Xamarin's efforts back then. But I digress...). Nowadays there are a few other attempts at providing that UI layer.



.net Core still has Windows Forms thoguh? At least I (for kicks) migrated one of my old .net 4.something projects to .net core and it still works and shows the classic Windows Forms GUI.

It's (of course) not portable



.Net Core on Windows has support for loading assemblies that reference COM interfaces and the win32 API, along with other things that aren’t supported elsewhere like C++/CLI.

That’s why loading System.Windows.Forms still works, it’s not part of .Net 5+, but it can still load the assemblies on Windows (they still use GDI, etc under the hood).



Sure, nobody wants to write Winforms new applications today

My point is about running existing applications on Linux, there are still issues with running .Net GUI stuff under wine and Mono was not a perfect implementation.

I read in other comments that the newer .Net cross platform stuff is not a replacement for Mono for running this old applications. (nobody will rewrite them to use the current GUI stuff from MS since are old apps)



I've had pretty good success running WinForms apps in wine, and just straight up installing latest version of dotnet in wine.

Works better in proton from my experience though, but I think that is due to making unity games run better



It is not perfect, there are issue depending if you need 32 or64 bits or if you need .net4 or greater. Games work but I have issues running tools like mod managers, game save cleners that are made with .net . In my case Sims3 works fine but not the Sims3 Launcher(this tools has more features then just launching the game like importing custom content/mods )

Sadly some Java tools stopped working if you run latest Java runtime because for some reason some crap was removed from Java and nobody made some easy way to add them back with soem package install.



Last I knew it is also considered pretty lackluster. Every time I read up on it it feels like, even beyond the lack of Linux support people just don't care for it.

If I was building a cross platform native app with .NET I'd probably use Avalonia right now.



Yeah, the took an age delivering it, then it came out and most of the early reports were “It’s still not ready.” and then I think Microsoft just gave up.

I think not supporting Linux was a tactical error, though. Some people will put up with a lot for Linux GUI support, and some of those people are the types who can resolve problems with your half-baked GUzi framework.



Does it really need help? I struggle to imagine a scenario where one would consider MAUI not supporting Linux to be an issue (if we discard superficial bad faith concern) when Avalonia, Uno or, if you care about Linux as the main target, Gir.Core exist.

And, at the end of the day, you have a tool with an extremely rich FFI capability so whatever is available from C you can use as well.



Sorry I clearly was not clear enough. I mean specifically an issue with MAUI itself. I agree dotnet/c# have some solid UI options cross platform at this point. MAUI however seems to be at best a mess and at worst dead in the water.



Open Source Support reasons. If Linux developers want better MAUI support there is a "Community Repo" to contribute to and help move things further along. The impression is that if things were further along it might get formally "adopted" (by the Dotnet Foundation) for "official" out-of-the-box "support", but it isn't far enough along and doesn't seem to have enough contributors with enough momentum. It currently seems that the Venn Diagram of "Developers that say they want MAUI support for Linux" and "Developers that would contribute to Linux support for MAUI" has too small of an intersection.

Sure, Microsoft could pay more employees to work on it faster, but Linux loves and prefers open source from Linux devs "untainted by Microsoft", right?



> "The future is already here – it's just not evenly distributed."

Were I live and work (IT and consulting in central south-east Norway) it has been the year of the Linux Desktop on and off since 2009.

That was the first time I worked full time at a place that deployed Linux for everyone and everything that didn't have a verified reason for needing Windows.

I think we had one 3rd party trading software running on a Windows machine and maybe the CEO and someone in accounting got Windows.

Everyone else was upgraded to Linux and it worked beatifully. It was my job to support the sales department with desktop related issues and it was absolutely no problem to do it while also being a productive developer.

Since then I have not worked on a place that required Linux, but I think most of the places I have worked on since has had Linux as an option as long as you supported it yourself, and some places also have been very active writing how-tos and working with me to troubleshoot issues that were related to Linux, since many of them were also Linux users.

At the moment I use Mac, but at my current job I'm also allowed to use Linux.



Contribute to the Maui backend for GTK and/or Qt, nothing is stopping you

Alternatively, just because you're on .NET doesn't mean you need to use Microsoft sanctioned UI toolkits, just as C++ has no "official" UI toolkit. You're free to pick up some GTK or Qt bindings if you want a native feeling and your application is already architectures correctly. Alternatively, throw Imgui at it if you just need dev tooling, or maybe try other cross platform toolkits in the ecosystem like Avalonia or Uno



If true this would be huge. I got burned on the whole silverlight, Universal Windows Platform, WPF etc. All these new and improved solutions had all sorts of issues, no designer, no or weaker accessibility stories, bloated, slow etc etc. C# + Winforms would be appealing. Some of the performance with larger datasets in the new solutions (tables etc) was just surprising. I really feel like Microsoft got so distracted chasing phones, tables, touch etc they forget just basic line of business application development which they could and should have owned.



You are expected to use Avalonia or Uno for multi-platform targeting or Gir.Core (GTK4) or one of the many other binding libraries for Linux-specific GUI.

Also very easy to throw something together on top of SDL2 with Silk.NET.

Practically speaking it is in a much better place than many languages considered by parts of Linux community to be more """linux-oriented""".



My personal use case is running old GUI apps, I am not planning on writing GUI apps with .Net , MS had the opportunity to open source .Net/Silverlight and make money from tools but they bet on Windows and today most apps are node and javascript, a much inferior platform but MS open things up too late.



.net Core doesn't supply WinForms, but WPF is the far more common paradigm for Windows apps now. WPF is supported by projects like Avalonia on Linux. There are also a few other major alternative UI toolkits, more commonly used by cross-platform (vs Windows-exclusive) developers.



You’re not alone.

I would say I’m not ‘new’ and even developed .net 4.5 for a number of years. I’m just as stumped by the naming mess that Microsoft made across the board in that space.

Edit: I say 4.5 because I mean the original thick .net which is not dotnet core, which I think is the way to differentiate between versions, but also all the sub libraries like the orm were iirc named the same but did different things.

They should have rebadged everything with a new name that didn’t involve a word that is fairly painful to google (‘core’) can be used in development as well as the name of a framework.



It's even worse, since they dropped the core now and just call it .NET. So searching has become even more of a pain. It's also pretty much a mess, because many things were different between the versions.

So let's say you google how to do something and the result could be:

  - .NET Framework
  - .NET core 1
  - .NET core 2
  - .NET core 2.1
  - .NET core 3
  - .NET 5+
Many times there will be no clear indication what version the result was built on.

On stackoverflow, answers sometimes include all versions varieties.



I think Microsoft is completely allergic to naming anything with a unique name or term; in fact, it's almost like they pick names that will be hardest to find with a google search.



Aside from following the default 'start here' documentation, there are various timelines made for fun and profit that visualize the full history, for example:

https://time.graphics/line/291016

This is quite overwhelming, but it can still be useful when reading an article about .NET that is either older or refers to history as you can quickly see where in time it is located.



> Is there somewhere where someone new to the ecosystem can get a simple introduction to all of these different terms and which ones are still relevant today?

Not really. It's legacy cruft all the way down.

But the good news is that if you stay on the beaten path, using the latest SDK and targeting the latest Runtime, everything Just WorksTM.



i want to love dotnet-core, especially since godot switched from mono in godot 3 to dotnet-core in godot 4, but so far i haven't been able to

currently debian has a mono package but no dotnet-core package. i'm not sure why this is; usually when debian lacks a popular nominally open-source package like this, it's either because it fails to build from source, or because it has some kind of tricky licensing pitfall that most people haven't noticed, but diligent debian developers have

does anyone know why this problem exists for dotnet-core?

also, does dotnet-core have a reasonable aot story for things like esp32 and ch32v003?



When using Microsoft repositories you need to explicitly opt out on telemetry collection.

I think telemetry collection alone should be a good reason for Debian to consider repackaging it. I don’t want telemetry to be collected on my GNU/Linux machine, thanks Microsoft, but you already have so much telemetry from my Windows machine, please leave my other machines alone.



yes, i know about the microsoft apt source

as for building from source, i see, thanks! or maybe it's unresolved legal concerns? nobody so far in this thread has known of any, though



you could easily imagine fedora distributing their own build of software whose licensing fails to comply with the debian free software guidelines; bundling proprietary software used to be common in linux distributions in fact



You can add add Microsoft's repo to install it on Debian: https://learn.microsoft.com/en-us/dotnet/core/install/linux-....

Does Debian require packages to work on all of its architectures? If so, that could be the issue. .NET Core only supports x86, x64, and Arm64 (I think Arm32 has been discontinued and RISC-V is experimental at this point).

It's possible that they object to .NET Core having certain license restrictions on the Windows port (https://github.com/dotnet/core/blob/main/license-information...). .NET Core is mostly MIT or Apache licensed, but the Windows SDK has some additional terms. Skimming the third party licenses, that doesn't seem like an issue (mostly MIT/BSD/Apache or similar).

I think the licensing situation is an interesting question: if you have software that's 100% open source when compiled for your OS, but requires non-free stuff to run on Windows, is it ok to include in Debian? It looks like none of the non-free stuff (like WPF) gets distributed with the non-Windows SDK builds. Binaries created from your code only depend on MIT-licensed stuff on macOS and Linux, but might depend on something closed-source when targeting Windows - though it looks like almost all of that stuff is either WPF (so you wouldn't be able to develop on Linux/Mac anyway since those libraries wouldn't be in the SDK on those platforms) or were removed as a runtime dependency in .NET 7. It looks like `Microsoft.DiaSymReader.Native` might be the only thing left. Maybe that's what is holding it back?

> also, does dotnet-core have a reasonable aot story for things like esp32 and ch32v003?

"Reasonable" can be a lot of things to a lot of different people. People have been working on RISC-V support. Samsung seems interested in it. But I probably wouldn't recommend it at the moment - and Mono doesn't really have RISC-V support either.



to be clear, my question about debian is not about whether i can install dotnet-core in debian; it's about why it isn't in debian's repositories rather than microsoft's. microsoft, to understate the case somewhat, doesn't provide the stringent protections for users that debian does

debian doesn't require packages to work on all of its architectures. luajit, for example, has not been ported to riscv64, mips64el, or ppc64el https://packages.debian.org/sid/luajit, though lua5.1 is https://packages.debian.org/sid/lua5.1. what the debian policy manual says about architecture-specific packages seems to be https://www.debian.org/doc/debian-policy/ch-controlfields.ht...:

> Specifying a specific list of architectures indicates that the source will build an architecture-dependent package only on architectures included in the list. Specifying a list of architecture wildcards indicates that the source will build an architecture-dependent package on only those architectures that match any of the specified architecture wildcards. Specifying a list of architectures or architecture wildcards other than any is for the minority of cases where a program is not portable or is not useful on some architectures. Where possible, the program should be made portable instead.

i don't think the license you link to would be a problem in itself, because it only applies to certain files which are not useful for running dotnet-core on debian anyway. debian has lots of packages from which non-free-software files have been removed. i don't know anything about diasymreader?

with respect to esp32 and ch32v003, what i meant to point to was not the risc-v architecture (some esp32s are tensilica!) but the limited memory space; jit compilation is not a good fit for 2 kibibytes of ram or even 520 kilobytes of ram



if you want your package to be in debian, you are going to have to find a debian developer who is willing to take responsibility for maintaining it. microsoft is already providing .deb packages on their website, at least binaries



getting one of your people to become a debian developer is similar in difficulty to getting one of your people to become a senator or a citizen of switzerland



Even with AOT compilation, as someone who loves C# and also does embedded development in C I would personally say a garbage collected language like C# has no place there.



not everything running on a 20-mips 32-bit microcontroller with 2 kibibytes of sram needs to be hard real time and failure-free, and of course the esp32 has hundreds of kibibytes

and, correct me if i'm wrong here, but doesn't c# allow you to statically allocate structs just as much as c does? i'd think you'd be able to avoid garbage collection about as much as you want, but i've never written much beyond 'hello, world' in c#



c# has the concept of value types (which structs are), which are stack allocated. Generics have seen more and more instance of getting a Value type like Value Task for stack allocated async objects. But if you add a class as a member of the struct that is going straight to the heap with all the GC stuff that entails



what about global or static variables of value types? i mean in theory you could stack-allocate whatever you want in your main() method and pass pointers to everything, but that sounds unusably clumsy. but with global variables and/or class variables there would be no problem except for things that inherently require heap allocation by the nature of the problem



Static fields may be placed on Frozen Object Heap. The values of static readonly fields may not exist at all if the ILC's static constructor interpreter can pre-initialize it at compile-time and bake the value into binary or codegen. Tiered Compilation does a similar optimization but for all cases. This is with JIT though which is not usable in such environment.

Otherwise, statics are placed in a static values array "rooted" by a respective assembly. I believe each value will be contained by a respective box if it's not an object. This will be usually located in Gen2 GC heap. My memory is a bit hazy on this specific part.

There is no concept of globals in .NET the way you describe it - you simply access static properties and fields.

In practice, you will not be running .NET on microcontrollers with existing mainline runtime flavours - very different tradeoffs, much like no-std in Rust. As mentioned, there is NanoFramework. Another one is Meadow: https://www.wildernesslabs.co which my friend is using for an automated lab for his PhD thesis.

Last mention goes to https://github.com/bflattened/bflat which supports a few interesting targets like UEFI. From the same author there's an example of completely runtime-less C# as well: https://github.com/MichalStrehovsky/zerosharp. It remains a usable language because C# has a large subset of C and features for manual memory management so writing code that completely bypasses allocations is very doable, unlike with other GC-based alternatives.



there are ways (byref I think?) to pass references to stack variables around. And Statics depends. Static const even with stuff like strings would just compile directly into the binary, regular static still has to end up on the Heap.



I believe that you would use dotnet nano for something like that. I used it (or some previous version of it) once many years ago and was very impressed with the productivity and ease of use it offered. Ultimately the lack of community surrounding it drove me to other technologies. Might have changed since then though, who knows!

https://www.nanoframework.net/



> It's a natural fit.

Does the wine project have the resources and knowledge to maintain it?

Or is it just so that microsoft can say they aren't the ones discontinuing it?



Another perfect execution of embrace(Microsoft became the steward of the Mono Project when it acquired Xamarin), extend(Microsoft maintains a modern fork of Mono runtime in the dotnet/runtime repo and has been progressively moving workloads to that fork), extinguish(we recommend that active Mono users and maintainers of Mono-based app frameworks migrate to .NET) for anyone who thought MS had actually changed since the bad old days.



I always assumed Microsoft did not condone Wine or other re-implementations of their APIs (like ReactOS), but that they were protected by DMCA reverse engineering provisions and anyway too insignificant to send the legal team after.

Wikipedia says,

> Until 2020, Microsoft had not made any public statements about Wine. ... On 16 February 2005, Ivan Leo Puoti discovered that Microsoft had started checking the Windows Registry for the Wine configuration key and would block the Windows Update for any component. As Puoti noted: "It's also the first time Microsoft acknowledges the existence of Wine."

> In January 2020, Microsoft cited Wine as a positive consequence of being able to reimplement APIs, in its amicus curiae brief for Google LLC v. Oracle America, Inc.



I think Microsoft has finally realized that its animus toward projects like Wine and pre-acquisition Mono was ultimately unproductive, and a net negative for Microsoft itself.

I still don't trust MS's motives in general, but I think they at least recognize that Wine/Proton helps make the Win32 and DirectX APIs a sort of de-facto cross-platform standard when it comes to things like desktop gaming, and that this is a good thing for them.

On the server side, MS knows that Linux is by far the most popular server OS, and official support for running .NET backend apps on Linux from MS themselves is a win for them as well.



I disagree. MS was completely succesfull in their goals. They kept a ton of developers busy learing useless Xamarin, thus keeping them from developing products that can actually compete with Microsoft products.

Next they killed of an open source competitor (Mono) of their product, stole the usefull bits to put it in .Net, and now they dump the leftover project (that's not competing with them anymore) back into the OS world.

How is that not a smart way of doing business?



> kept a ton of developers busy learing useless Xamarin...

What kind of moustache-twirly stupidity is this? Yeah, Microsoft maintained a shitty cross-platform SDK so that developers would make worse software, because that's somehow helping any of their main product verticals. By the way, those are (broadly speaking) cloud, client software, and games.

Do you have any evidence to suggest that there was a Xamarin-based application that would have directly competed with Office? How about Fallout? Now, do you have any evidence that Microsoft tried to make Xamarin worse at doing the thing that application was trying to do?

> Next they killed of an open source competitor (Mono) of their product

Microsoft's implementation is also open source, and has been for almost a decade: https://github.com/dotnet/runtime

> that's not competing with them anymore

Sure. Mono is only useful for legacy purposes. Microsoft's own design was always the reference implementation of .NET, regardless of whether it was open-source. Mono existed for the sole purpose of being an open, cross-platform reimplementation. Now that the reference design is itself open-source and cross-platform, Mono is mostly redundant.



>that Wine/Proton helps make the Win32 and DirectX APIs a sort of de-facto cross-platform standard when it comes to things like desktop gaming, and that this is a good thing for them.

I'm not sure if it benefits microsoft in the long term, because the "backwards compatibility" features of Wine need to be implemented in Windows already as a part of the system. So in the long run wine/proton/mono will implement windows features on linux in an optional/replaceable/modular way in user-space while keeping backwards compatibility for older windows software, while windows is forced to implement (and distribute these features) with their OS and has to sacrifice backwards compatibility if they want to simply their OS.

I would say that the adoption of wine/proton helps the linux ecosystem a lot more because there wasn't a standard executable format for linux beforehand (static? tarball of program and dynamic libraries? .deb file? AppImage? Flatpak? Higher-level language like java?). How do you reliably link to libraries like mesa or even glibc? Now there is a solution: just distribute a windows program and test it to confirm it works in wine/proton. Perhaps it is better for DirectX adoption, but it seems like Vulkan/OpenGL/WebGPU are still superior in terms of cross-compatibility, regardless if you use wine or not.



> there wasn't a standard executable format for linux beforehand (static? tarball of program and dynamic libraries? .deb file? AppImage? Flatpak? Higher-level language like java?).

By this logic there wasn't a standard executable format for Windows, either (static? zip archive of program and dynamic libraries? .msi file? installer program? UWP? higher-level language like C#?).



Windows NT (2000, XP, etc) used to include an emulator allowing to run DOS apps and win16 apps. I don't see why running older / obsoleted win32 APIs through an emulation layer won't be a good approach. Maybe even by adopting and running Wine.



> I'm not sure if it benefits microsoft in the long term, because the "backwards compatibility" features of Wine need to be implemented in Windows already as a part of the system.

Sometimes running old software atop Wine on Windows is the easiest - or even only - option to have said old software work on new Windows.



Microsoft as a company is extremely myopic. Budgets are scrutinized down to the penny every few months at very senior levels. This drives a culture of immediacy. Wine was a threat until Microsoft realized everyone in tech had moved to service based business models (aka "cloud"). Only afterwards, did they "realize" Linux as a threat to their long term viability no longer mattered.



They finally started to admit where they're losers and stop trying to fight those battles.

Dumping endless piles of cash into projects nobody cares about and pretending like you're the dominant player when you control some dwindling 2% of the market is stupid and more companies should learn that lesson



I think it's more because individual pc instances literally doesn't matter anymore. Operating systems and programming languages which lock you into them are irrelevant from a revenue standpoint.



The aircraft carrier will hit the shallows, but that massive inertia can "carry" it for decades without any new thrust.

Remember when Microsoft was able to fight off the Web with piss-poor Internet Explorer? Until it didn't.



> I still don't trust MS's motives in general

I think it's the same for any global enterprise: profit.

In that regard, "trusting" something like MS is like evaluating their stock: what do they make money off, what is a threat to that. Which makes it rather easy to "trust" them: if they can make money off SomeOpenSourceProject they'll help it along, if it doesn't help, nor threat, they'll ignore it. If it's a threat, they'll put (some) money towards fighting it.

For me the difficult part, and why I still don't fully trust MS, even with Github or VScode lies in their internal competition: MS has projects that directly compete eachother. Business-wise it makes no sense to me (and is the primary reason I'll stay away from investing in MSFT). But also their internal competion between profit now and delayed profit. MS has often done things (or not done things) that increase the bottom line this quarter, but harm them over years. In that regard too, MS makes no sense to me Business-wise. I guess having a cash-cow-"monopoly" for decades kinda absolves them of the responsibility to run the entire company in a way that makes sense business-wise.



I think it's just such a clear business-razor because of the cloud: can I take my app and spin up a bajillion cheapo servers with no licensing costs using that stack?

If the answer for .Net was 'no' then there are meaningful domains where people would just jump ship in a second. Research, academia, teaching, and certain government areas pop to mind. Keeping Linux support, because of that server dominance, is a core concern for them.



Maybe they feel the same about Wine as I do about WSL.

You can argue that the my-thing-wrapped-inside-your-thing increases exposure to my-thing and that's a net good outweighing any other factors, but you can just as validly argue it helps divert from actual adoption of my-thing and facilitates never moving from your-thing, since no one has any actual empirical study, it's all just feelings and beliefs.

Maybe one logical argument that might have some meat is maybe WSL/Wine just means that the exposure vs crutch aspects cancel each other out (for every user who is exposed to foreign-thing and maybe decides to adopt it, there is another user who thanks to the swallowed version does not ever have to to move), and if that's true, then any imbalance in effects comes down to the the innate virtues of the two things. Both groups of people are equally exposed to both platforms and have equally good-enough use of both platforms, and neither has to actually change to get the benefits of the other, and so the user will choose whichever actually seems to serve their needs the best as their native platform.

I wonder if it's possible to make a desktop backed by WSL that would be a better experience than the current ad/spying-riddled Windows native desktop? Then MS would be forced to try to enshittify WSL so that it doesn't provide an escape and superior experience from the current Windows experience. Is WSL a good thing THEN?

At least for now, WSL has absolute crap access to hardware, not even just like gpus for gaming but even simple things like access to a usb-serial adapter. So, it's probably not possible to make a functional WSL desktop yet. Maybe such things will intentionally never be fixed in WSL just for this reason, so you can only ever use it for pure web app development no different from a cloud instance.



> Wine/Proton helps make the Win32 and DirectX APIs a sort of de-facto cross-platform standar

There are perfectly fine _actual_ cross-platform standards like Vulcan and OpenGL. If your goal is cross-platform, making a Windows app that you hope will be converted well enough is a strange way to approach it.



And yet, the win32 is the only one that is confirmed to work. Example: Game Neo Scavenger is available for linux with binaries for them. They dont work in any modern linux because (I believe) they were compiled for a 32bits version of linux.

Do you know how you can play the game on linux? Yes, using the windows version with lutris, which is 32bits too.



That doesn't help, most Linux distributions do not maintain ABI (library-program linkage) compatibility between major releases, and in the case of rolling distros half the system has to be recompiled when things such as libcurl, openssl, libc etc change. If these change, it's possible that anything compiled agaisnt the system version of it will no longer work without being recompiled

Windows goes back and beyond for compatibility with existing compiled software and Wine inherits that, is partially why Windows versions under Wine often have a higher chance of running than the native versions (ARK is a great example)

Projects like Flatpak attempt to solve this by the use of runtimes.



Microsoft in 2024 feels like a different beast. All the MS devs I know seem fully on board with totally cross-platform support. Half of them are coding on MacBooks and I would hazard a guess that a good proportion of .NET web sites being built are being deployed onto Linux boxen.



.Net SRE here, all our .Net REST APIs are deployed on Kubernetes. Devs are still mostly on Windows because Visual Studio.

I've worked with Azure team, all greenfield they do for Azure goes on Linux as well. Windows Server is pretty much dead to Microsoft though it will be continue to be supported and released because $$$.



It's been very hard to explain to my organisation that Windows Server is dead. We haven't deployed a system to it in two years, everything is some kind of dockerised linux thing but the "we're a Microsoft shop" idea prevails.

In the end we decided to just let the management think what they want. I've been more of a Unix person for 40 years but I kind of miss the "good" versions of Microsoft Server - in the 1990s / early 2000s it was a real contender. If they hadn't doubled down on weird things like Powershell it might still be a contender.



Not sure what you've used it for but Powershell is about the best thing to come out of Microsoft in the last decade. Very useful and extendable - useful anywhere bash is. It's also the scripting engine of choice for Azure and Entra ID too which is far from Windows Server Land.



It hasn't. Powershell is probably one of great things to come out of Windows Server. I still use it with *nix machines and it powers some sidecars at work. If you are stuck with Windows Server, it's only thing that gives you a fighting chance of being able to do anything NotClickOps (tm)

Sure, it's got some unique characteristic that more traditional shell users dislike but that's just a matter of taste.



It irks me that the default for servers still seems to be 5.1 which is anemic and seems to have really weird quirks and syntax differences from later versions. As if the default silent jsondepth thing was not enough converfrom-json hash tables have case insensitive keys. Really?

Someone wrote some automation code that handles json payloads using powershell. When we tried to migrate to azure functions which uses 7.x by default things broke because users never cared to check sensitivity of key names.

It’s also slow even for interpreted language standards.

I’ll seriously never use powershell for anything serious ever again even though I admit syntax and design feels kinda nice.



Because backwards compatibility. I've run into stuff that doesn't working in 7.x without a rewrite.

It's just best to think about Powershell 5.1 and Powershell Core 7.x like Py2 -> Py3. Most of code works as is, some doesn't, and you should use latest when you can.

>Someone wrote some automation code that handles json payloads using powershell. When we tried to migrate to azure functions which uses 7.x by default things broke because users never cared to check sensitivity of key names.

Azure Functions are nightmare in its own. Not sure how much of that is Powershell fault vs Azure Functions.

>It’s also slow even for interpreted language standards.

Actually, it's blown Python out of the water at work. It's startup time can be painful as it's interpreting everything but once it gets going, it really moves. We use it to churn through 4GB CSV at work replacing a Python script, it's much much faster.

>I’ll seriously never use powershell for anything serious ever again even though I admit syntax and design feels kinda nice.

Your loss. Despite the few problems I run into, I really like it and wish more *nix people gave it a try. It's much better then bash nightmares I've seen.



If Windows Update replaced components of Wine, that would (a) break people's Wine installs, and (b) give those users a way to legally get Microsoft's versions of those components for use outside of Windows.



Microsoft’s EULA would still apply to (b).

It’s the exact same situation as downloading a Windows ISO from Microsoft’s website and running it with an activator.



AWS Supports one of the tools for porting out of AWS. Supporting something that looks like an escape valve (whether it works or not) keeps the antitrust people off your neck.



Even if Wine had become drop in replacement for modern Windows distribution, I doubt it would hurt much. Business would likely still buy Windows, because of support and security patches. Consumers would get their Windows preinstalled. Some manufacturers would probably do Wine installations - but then it would depend on support. Don't want to sell machines to people who are not tech savvy, that are not getting updates. That is a potential for returns and massive cost and headache.



I mean, if wine is a problem they did basically the same thing with the WSL, especially version 1 (version 2 is just a VM, but the concept of running unmodified Linux binaries on Windows like they are native application is the same).

I think that they don't care about going against the open soruce community, given that Microsoft uses a lot of open source software in their products (also, probably violates the terms of the GPL license of such software).



Fun fact: Second Life, the virtual world, has an in-world scripting language called LSL, and it gets compiled to bytecode that gets run on a virtual machine. Initially, it got compiled to bytecode that ran on an in-house virtual machine, but in 2008, they switched over to compiling LSL to Mono bytecode to run on the Mono virtual machine. I wonder if that's still how it works. (I haven't been involved with SL for a long time.)



I like the strategic approach. Pay attention software publishers, and hardware manufacturers! You can gain some significant public accolades.

When a publisher or manufacturer wants to end a product line, instead of shutting it down, spin it out as F/LOSS, and give it some seed money. If the thing is good, people will pick it up and it will survive. If not, the company still gains public appreciation.

This dovetails well as a potential solution into the problem we are discussing in the Smart TV, smart home, smart vehicle articles.



Microsoft's own FOSS multiplatform implementation of the .NET runtime is now much more performant and feature complete than Mono.

However Mono is easier to embed into other applications and easier to port to new platforms. That is for example why it's used for the .NET/Blazor WebAssembly stuff. Microsoft still maintains their own fork of Mono for this specific use case.

Mono also implements some of the legacy Windows Desktop GUI frameworks like WinForms and WPF that Microsoft never bothered to port to their new .NET runtime. This is probably why the Wine developers might be interested in Mono.



Wine has (or used to have anyway, not sure if it still does) a version of Mono it used to run .NET stuff within Wine; I'd assume this has to do with that, that they were relatively alone in having a continuing interest in the Mono codebase vs. the dotnet core stuff.



That's what ’free as in puppies’ mean.

Free software is typically described as "free as in freedom" or "free as in free beer". (This is probably a limitation of English tho, my language has 2 different words for permissions and costlessness.) GP above proposes the "free as in puppy" variant, which means that it is a burden of maintenance. I can't recall any real examples for this.



If you want to be pedantic, English does have distinct words for the two connotations of free--"liberal" and "gratuitous". Although it should also be immediately obvious why those words aren't preferred either: "liberal" also has several other connotations (to the point that a "Liberal Party" could be almost anywhere on the political spectrum), while "gratuitous" tends to lean more towards "unnecessary" than "free of charge" in common parlance.



> English does have distinct words for the two connotations of free--"liberal" and "gratuitous".

Sorry but no it doesn’t. These words have the other meanings you mentioned, but they don’t include either of the meanings of “free”.

If you said you were giving away “gratuitous software”, native English speakers wouldn’t know what you were talking about. The only way to understand it would be to realize that those words are etymologically cognate to words in European languages that do have those meanings.



The word "liberal" definitely has the same definition of "libre"--ever hear of the term "liberal democracy"? That's exactly the same kind free they're talking about.

"Gratuitous" also has that definition, though it's far less common in use. See the dictionary definition, e.g., here: https://www.dictionary.com/browse/gratuitous

> 2. given, done, bestowed, or obtained without charge or payment; free; complimentary.

It's more of a stretch there, because the primary definition of gratuitous has a connotation of unnecessary, even undesirable. If you didn't have at least some hint of disapproval of a service, you'd reach for the word "free" long before "gratuitous".



The “liberal” in “liberal democracy” doesn’t mean the same thing as the “free” in “free software”. It’s the license that is liberal, not the software itself, so at most I’d admit that “liberally licensed software” means the same thing.

Similarly you would say someone who’s gotten out of prison is now “free” (or libre in French or Spanish) but you wouldn’t say they’re “liberal”.



"Gratuitous software" would be excessive and unnecessary software. Which I think a lot of commercial (particularly "news") websites qualify for, and "modern" websites in general. NPM makes it easy to just install something, which requires all kinds of other things, which duplicate each other, etc.

Strangely enough, I think the LaTex distribution qualifies, too. I tried to install it recently, and it wanted 1 GB of disk space! That's multiple times the size of the entire system disk when LaTeX was created...

Sooner or later a lot of the web is going to run on WASM, at which point we'll have a virtual machine running in a user program running on an OS which incompletely virtualizes the bare machine (hence why we've ended up with WASM). Extra gratuitousity if the browser is an Intel binary being run on an M* processor via Rosetta translation... Maybe eventually we'll realize that the OS needs to provide a full virtual machine, complete with window to draw in, filesystem isolation like Plan 9, etc. But, inertia will probably make it take while.



> Strangely enough, I think the LaTex distribution qualifies, too. I tried to install it recently, and it wanted 1 GB of disk space! That's multiple times the size of the entire system disk when LaTeX was created...

There is the TinyTeX distribution, which is smaller. (Despite its name, it isn't tiny, or small, or medium in size, but it is also large. But smaller than the default LaTeX distribution with all the possible packages, source code and documents.)



To be fair, "free as in beer" doesn't work for a lot of people who don't drink (or do drink, but don't like beer). I don't think we're going to come up with a one-size-fits-all slogan...



I think it's just hurting someone at Microsoft less if they give it a home that isn't /dev/null.

Edit: quick hat tip to Mono.Cecil which I've used a couple of times to crack .Net components to bypass licensing code. It's not that we didn't pay for them but we couldn't be bothered to deal with license deployment and maintenance.



Mono was very useful in university. Must have been 2005 when I got asked if I wanted to use Java or C# for the programming course. Being bored with Java I picked C#. We were a very small group of two students.

But as I just had a Powerbook I used Mono to run it on OS X. At the end of the course someone from Microsoft came to the university to answer any of our question about upcoming features in .NET and C#. And as we were a small group I set directly in front of him with the shiny apple point at him.

Very interesting language at that time. .NET not so much. Also still remember that we were tasked to implement 3 sort algorithms of our choice. One of mine was bogosort and with Mono on PPC it could sort up to 7 elements, before becoming really slow.



A bit off-topic, but this makes me wonder about the relationship between Microsoft and Wine. Do they consider it a threat? An ally? Both?

This is my first time seeing Microsoft acknowledge Wine's existence, and in this case, it was at least in a friendly manner? Or could there be bad faith behind this 'donation'?



Another poster quoted Wikipedia somewhere here; MS implicitly acknowledged Wine's existence back in 2005 when they added a check for some of Wine's registry keys which would disable Windows Update if it found them. And in 2020 MS filed an Amicus brief in that Google/Oracle lawsuit in support of free re-implementations of APIs, citing Wine as a positive example.

While I am still wary of Microsoft after their previous anti-competitive behaviors, I think they've taken a more pragmatic view of late, and realize that projects like Wine are actually good for their platform as a whole. I expect if Wine/Proton did not exist, we'd see more (for example) Windows-only games ported to macOS or Linux. With Wine/Proton, those ports are mostly not necessary, and Microsoft gets to say that Win32/DirectX is something of a cross-platform gaming "standard".



The best Wine environment is still a Windows install. You need a lot of things to do to run some of the mill Win32 app, so Wine is not a direct threat for MS in any foreseeable future.

联系我们 contact @ memedata.com