Hacker News new | ask | show | jobs
by zbowling 659 days ago
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.

10 comments

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 wild, apparently this stuff is in the Debian repos now? https://learn.microsoft.com/en-us/dotnet/core/install/linux-... So you can just apt install dotnet-sdk-8.0.

This must be the most unfriendly Linux install documentation I've ever seen though, it was not easy to find the names of those packages.

> This is wild, apparently this stuff is in the Debian repos now?

It's not. Microsoft provides its own apt repository you need to add first.

Some distributions have it in the standard apt repo, like Ubuntu.
It's in a bunch of other distros, though: https://repology.org/project/dotnet/badges
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

dotnet-sdk-8.0 should have the rest of what you need downstream from there. For other libraries and versions, you should be able to use NuGet with your project directly.

I've been using the script installer version intended for ci/cd as I actually like that installer more, it's the only one that really supports multiple versions correctly.

Huh, why isn't it in?

Does it not meet the DFSG?

The Request For Packaging arrived a week ago, its all still very fresh and new: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1078132
What's unfriendly about just clicking through the options? Anytime I want to install .NET, I just go to that exact documentation, click on the distribution I want (usually Ubuntu), and then just click on the version (https://learn.microsoft.com/en-us/dotnet/core/install/linux-...). I almost always use Microsoft's feeds though, so as to not rely on the middleman of the Ubuntu package manager feeds.
Ubuntu is a subpar package maintainer, but in well run distros that middleman who does the packaging makes an effort to ensure you are getting a stable, performant package, and tries to catch eratta or abusive practices that upstream starts pushing (say, Microsoft opening Edge when you run wget or curl in the terminal, rather than calling the real wget or curl).
> This is wild, apparently this stuff is in the Debian repos now?

It's been there for several years now, hasn't it?

Not Debian, but some Debian-based distros
> 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.

That is like saying C is not cross platform because there is not a library for making desktop apps that use native components on all those platforms.
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.
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.

.Net is "Microsoft Java". Like Java it was designed to do everything, but as desktop development died (and mobile development was locked down by Apple and Google, limiting it to their corporate languages), it pivoted towards networked applications.
Same with java - designed for embedded set top devices, pivoted to backend services.
.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.

That's also not part of the JVM or the Java language.
Jetbrains is a third party vendor here, too.
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.

Oh my god I forgot about .NET Standard. What were they thinking…
While I don't have much direct experience with it, as it was easy to migrate my personal projects, it seemed the idea was sound. It seemed like it was a way to encourage people to write libraries against the new .NET Core (at the time) but still allow those libraries to be used in .NET Framework as a sort of bridge for people stuck on .NET Framework.
PSA for new players.

Do not under any circumstance trust Microsoft for anything at all.

They have a decades-long history of treating their best customers with contempt.

They will break or deprecate whatever you rely on, and they will do it without warning.

If only. Class libraries still have to worry about this.
Mono was, but newer versions of .NET run on Linux and Mac.

You can install at the link below, and then making a project is just `dotnet new console` and run with `dotnet run`

https://learn.microsoft.com/en-us/dotnet/core/install/linux

For historical context: this was before the conclusion of the antitrust case that led Microsoft to start softening its stance toward open source. https://en.wikipedia.org/wiki/United_States_v._Microsoft_Cor....

This was the same year Antitrust came out: https://en.wikipedia.org/wiki/Antitrust_(film)

Any support for open source or cross-platform stuff was a bulwark against claims of monopoly abuse, but none of it worked well enough to be a true replacement. Mono worked for some purposes, but it was far from the first party support cross-platform .NET gets today. Nowadays it sounds like .NET Core + third-party GUI libraries is the way to go.

> 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.

Okay, this helps a lot! So .NET Core is now out of date, and any version of .NET >= 5 is cross-platform and has no Core variant?
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.

That's correct
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.

It's a fork with a lot of modifications (mostly removing deprecated stuff and making it cross-platform). You can still see a lot of ancient stuff in the sources such as referring to the base Object class as "COM+ object" (.NET was originally envisioned as a successor to COM).

>An early name for the .NET platform, back when it was envisioned as a successor to the COM platform (hence, "COM+"). Used in various places in the CLR infrastructure, most prominently as a common prefix for the names of internal configuration settings. Note that this is different from the product that eventually ended up being named COM+.

For example, see the top comment in https://github.com/dotnet/runtime/blob/main/src/coreclr/vm/o...

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.

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.
> So, if you want to do the most modern cross-platform C# you would use .NET 9.

The current release is .NET 8

.NET 9 is about 3 months away from the usual November release.

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.

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.
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.

More like it was shoring up for developers who use and/or target mac and linux. Many devs are using macs and targetting linux for deployments. MS wants Azure to be a first class option for developers and is the focus for making money going forward. It makes sense for their developer tools to offer that.
Azure didn't exist. OS X had just come out and almost no one took Macs seriously as a development target yet. Windows was the only user-facing thing anyone developed for aside from little Java games on flip phones. The Web 2.0 takeover was still years off and Internet Explorer ran the show.

Is "historical context" not as clear as I thought? You're the second person to challenge this by pointing out the current situation when I'm talking about how we got here.

The first Macs to use Intel processors were released in January 2006

Microsoft Azure was first released on February 1, 2010

Microsoft released .NET Core 1.0 on June 27, 2016

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).

You can use third party libs like Avalonia[1] or Uno[2]

[1] https://avaloniaui.net/ [2] https://platform.uno/

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)

No, Microsoft's .NET only supports WinForms on Windows. They do have an official cross platform GUI toolkit in MAUI, but it strangely does not support Linux.
For this, having wine in charge makes sense - though, as with many things wine you could be waiting a while.
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

With commercial applications that want to just take their existing code and have it run on Linux with only a couple lines changed, Avalonia XPF will do that
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.
I think this is what you need now...

https://dotnet.microsoft.com/en-us/apps/maui

"Build native, cross-platform desktop and mobile apps all in one framework."

I know my buddy uses it to write Android apps on his Mac that interface to an ASP.NET Core web site.

I don't think that supports Linux tho
I had to check; you're right, no official support for Linux. Windows, macOS, iOS, Android. You can kludge Linux in with hacks.
Isn't it just another Xamarin rebrand?
No, they pretty much gave up on winforms when .net core morphed into "the" .net that is cross platform. There are some nice crossplatform gui libs now though.
Not really. Winforms have been updated to .net core. And a bunch of handy features to modernize it have been added.

I'd say it's the simplest and quickest way to go if you need to bang out a quickie app for Windows only.

https://learn.microsoft.com/en-us/dotnet/desktop/winforms/?v...

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.
What are the ones to use in 2024? I used to code informs, it was a great improvement on its successors.
.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.
.NET Core does support Windows Forms just fine, but it’s only available on Windows.
Is .NET open-source? Will I find it in an open-source repository?
This is the "virtual monorepo", if you want to clone one repo and build the entire SDK product then this is the correct thing to checkout - but development work right now still happens in the separate project repos, of which there are ~20
Also, the main languages:

https://github.com/dotnet/roslyn

Is there a way to build a GUI app with .NET on Linux?

Will it be cross-platform?

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.

Sounds like Flutter?
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
> Is there a way to build a GUI app with .NET on Linux?

yes

https://avaloniaui.net/

There was also a GTK package for Xamarin Forms which I've used https://github.com/xamarin/Xamarin.Forms/pkgs/nuget/Xamarin....

BUT That's now officially unsupported as all of Xamarin Forms is no longer supported and the MAUI replacement doesn't cover Linux nor does that look likely (MAUI is mired deep in problems due over-ambition, failure to resource and it seems a significant push in MS to use MAUI Hybrid aka web UIs within native apps).

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, .net is for azure cloud webapps, that's how modern software is made. Then wrap them in electron to make them native.
https://github.com/picoe/Eto

  - OS X: MonoMac or net6.0-
  - Linux: GTK+ 
  - Windows: Windows Forms (using GDI or Direct2D) or WPF
Gtk

  - Gtk3: https://github.com/GtkSharp/GtkSharp
  - Gtk4: https://github.com/gircore/gir.core
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.

There's this:

https://docs.tryphotino.io/Overview

Which lets you run Blazor (web framework) like a desktop UI across all major desktop platforms. Microsoft has MAUI/Blazor as a thing, but only targets Mac and Windows ATM, so Photino bridges the gap for Linux.

Photino lets you use anything other than just .NET but has pretty decent .NET support.

There is also Uno

https://platform.uno/

Create an ASP.NET Core web server embedded in a binary bundled with Electron and a React frontend. (jk)
That is how electron.NET basically works
Kind of suspected people might actually be doing that. “You may live to see man-made horrors beyond your comprehension.”
(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

> 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,

History here https://en.wikipedia.org/wiki/.NET

.NET Core 1.0 (2016) was the first cross platform prototype. It got good in a release in 2018 or 2019, I even forgot which now. And took over steadily after that.

We don't even think about it any more. "which OS is the prod env on" isn't a factor that causes any support worries at all.

Getting set up would start at https://dot.net/

And the download page, which should show you content for your current OS https://dotnet.microsoft.com/en-us/download

But also other targets are here https://dotnet.microsoft.com/en-us/download/dotnet/8.0

You'll want the latest SDK 8.0.x

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.

Given current naming scheme, what do you propose?
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.
This is compounded by their propensity to rename everything at periodic intervals.
If you just want to get into .NET (C# or F#) on non-Windows platforms, the latest .NET release (at the time of writing, 8.0) is what you want. The development experience is good these days.

For a historic summary of why it used to be a confusing situation (up until maybe 2020), see https://two-wrongs.com/dotnet-on-non-windows-platforms-brief...

That also has some background on why the Mono project found itself in a weird spot.

dot.net is the official starting point. It'll point you to getting setup with .NET dev on Linux. You can either use VSCode or Intellij Rider.
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.

As the OP notes, MS use their own fork of Mono for the .NET Core runtime these days. So you're not wrong but they are different codebases these days.
The .NET Core runtime was never a fork of Mono, it’s always been a separate code base.
I never claimed that the .NET Core runtime is a fork of Mono but it certainly contains one: https://github.com/dotnet/runtime/blob/main/src/mono/mono/mi...
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?

.NET Core is available for Debian, you just have to add Microsoft's APT source [1].

Fedora [2], Ubuntu [3], and FreeBSD [4] build .NET from source themselves. A lot of work has been done to make it possible to build .NET from source [5] without closed source components, so it might just be a matter of someone being motivated to create the package for Debian.

[1]: https://learn.microsoft.com/en-us/dotnet/core/install/linux-...

[2]: https://src.fedoraproject.org/rpms/dotnet8.0

[3]: https://launchpad.net/ubuntu/+source/dotnet8

[4]: https://github.com/freebsd/freebsd-ports/tree/main/lang/dotn...

[5]: https://github.com/dotnet/source-build

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.

I hate to defend telemetry of all things but in this particular case the criticism is unfounded and lacks context:

https://dotnet.microsoft.com/en-us/platform/telemetry

https://learn.microsoft.com/en-us/dotnet/core/tools/telemetr...

https://github.com/dotnet/sdk/tree/main/src/Cli/dotnet/Telem...

In any case, Debian would use https://github.com/dotnet/source-build and dotnet/dotnet, and could easily include the argument or a patch for this. It’s unlikely to be an issue. My bet it was not in Debian because there was no one to take initiative yet or there was but that person has faced a backlash by people in Debian who are similar to vocal minority here that posts FUD because of their little personal crusade.

Your second source mentions you have to change a variable in bash to opt out for telemetry, I fail to see where the FUD is.
yeah, debian does generally make spyware explicitly opt-in. even https://popcon.debian.org/stable/index.html is explicitly opt-in

i think the links you provide make it clear that the criticism is not unfounded

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

I found someone requesting that it be added to Debian:

https://bugs.debian.org/cgi-bin/%3Ca%20href=%22bugreport.cgi...

So far no one has mentioned licensing being an issue.

that's great! possibly the link you meant was https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1078132

that seems to be from only a few weeks ago though

it doesn't seem to have come up on debian-legal in the last year or so https://lists.debian.org/debian-legal/ but debian-legal is also kind of a shadow of its former self

Notably in that bug report the reporter says they cannot maintain it (not that I blame them, not a small work)
I doubt it is due to legal concerns if Ubuntu, Fedora, and FreeBSD are all distributing their own builds.
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
"legal concerns" is not the same as philosophy differences.
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

> Arm32 has been discontinued

.NET 9.0 preview still includes ARMv7 builds for Linux: one based on glibc library, another one for Alpine.

I would say it is .Net Foundation job to prepare and submit the package not Debian maintainers.
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
But it is not Microsoft like I mentioned but .Net Foundation.

They could get one of their people to become Debian maintainer.

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
That's not how Linux distros work. The OS maintainers make their own packages.
It sure wouldn't hurt if they hired a Debian Developer to do it right, or maybe work through the process of turning an employee into a Debian Developer.
Debian developers can do it right because they're not affiliated with the vendor, so they can disable user-hostile features and settings that the vendor enables by default.
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.
GC is fine for many (most?) applications there. For example sensor stuff, display, networking, turning your lights on and off, etc.
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/

In many ways, .NET today finally fulfills the original Mono goals, and does so in a very performant manner.
> 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?

It never had any sense, and it never had any future. We told Miguel he would be playing the chase game with Microsoft and he will always be behind and never being sure if MS won't use the patent card if Mono actually becomes dangerous (and they can get quite nasty when pissed off - see the accusations against ReactOS).

But he was in love with COM/DCOM, registry, and many other things that MS shipped. Some of these things made Gnome much slower than it could be.

Mono also had (limited?) support for ASP.NET non-Core. I wonder how many companies actually used that.
Hi, what does wine use mono for? Is it to support full fat .Net? Interesting post btw, thanks :)
Trip down memory lane touching several points in my career. Rip /.
Was their Version Control a Monorepo
Interesting. Perfect fit for Wine!