Mono Project: Still Relevant for Cross-Platform .NET Development?

I’ve been looking into the Mono project again after a long time. For those who don’t know, Mono is an open-source implementation of Microsoft’s .NET Framework that allows running .NET applications on Linux, macOS, and other platforms. It was a pioneer in bringing .NET to non-Windows environments.

With the rise of .NET Core (now .NET 5+), some think Mono is obsolete. However, Mono still powers many legacy applications and is the foundation for Xamarin (mobile development). It’s also used in gaming (Unity scripting) and embedded systems.

A simple example of a C# program that works on Mono:

using System;

class Hello
{
    static void Main()
    {
        Console.WriteLine("Hello from Mono on Linux!");
    }
}

You can compile and run this using Mono’s mcs compiler and mono runtime. It’s still a solid choice if you need to maintain existing Mono-based projects or target platforms where .NET Core isn’t available.

What are your thoughts on Mono vs .NET Core for new projects? I’d say for greenfield, go with .NET Core, but Mono is far from dead.

Topic Summary: I’ve been looking into the Mono project again after a long time. For those who don’t know, Mono is an open-source implementation of Microsoft’s .NET Framework that allows running .NET applications on Linux, macOS, and other platforms.

:hammer_and_wrench: Featured GitHub Resource:

  • icsharpcode/ILSpy - .NET Decompiler with support for PDB generation, ReadyToRun, Metadata (&more) - cross-platform! (★ 25649)

:open_book: Topic Overview (Wikipedia):

Mono is a free and open-source software framework that aims to run software made for the .NET Framework on Linux and other OSes. Originally by Ximian which was acquired by Novell, it was later developed by Xamarin which was acquired by Microsoft. In August 2024, Microsoft transferred ownership of Mono to WineHQ. — Read more on Wikipedia

:movie_camera: Video Tutorial:

:books: Official Documentation & Reference Links:

---
title: Mono Project Relevance Decision
---
flowchart TD
    A["Start: Cross-Platform .NET?"]
    A --> B{"Target Platform?"}
    B --> C[Desktop]
    B --> D[Mobile]
    B --> E["Web/Server"]
    C --> F{"Use .NET Core?"}
    F --> G["Yes: .NET Core/.NET 5+"]
    F --> H["No: Legacy App?"]
    H --> I{"Mono compatible?"}
    I --> J["Yes: Use Mono"]
    I --> K["No: Migrate to .NET Core"]
    D --> L{"Use Xamarin?"}
    L --> M["Xamarin uses Mono"]
    L --> N[".NET MAUI uses .NET 6+"]
    E --> O["ASP.NET Core: Use .NET Core"]