Mono open source ECMA CLI, C# and .NET implementation.
Mono open source ECMA CLI, C# and .NET implementation.
Mono is a software platform designed to allow developers to easily create cross platform applications. It is an open source implementation of Microsoft's .NET Framework based on the ECMA standards for C# and the Common Language Runtime.
The Mono project is part of the .NET Foundation
[!IMPORTANT] The Mono Project (mono/mono) (‘original mono’) has been an important part of the .NET ecosystem since it was launched in 2001. Microsoft became the steward of the Mono Project when it acquired Xamarin in 2016.
The last major release of the Mono Project was in July 2019, with minor patch releases since that time. The last patch release was February 2024.
We are happy to announce that the WineHQ organization will be taking over as the stewards of the Mono Project upstream at wine-mono / Mono · GitLab (winehq.org). Source code in existing mono/mono and other repos will remain available, although repos may be archived. Binaries will remain available for up to four years.
Microsoft maintains a modern fork of Mono runtime in the dotnet/runtime repo and has been progressively moving workloads to that fork. That work is now complete, and we recommend that active Mono users and maintainers of Mono-based app frameworks migrate to .NET which includes work from this fork.
We want to recognize that the Mono Project was the first .NET implementation on Android, iOS, Linux, and other operating systems. The Mono Project was a trailblazer for the .NET platform across many operating systems. It helped make cross-platform .NET a reality and enabled .NET in many new places and we appreciate the work of those who came before us.
Thank you to all the Mono developers!
Join us on Discord in the #monovm channel:
Legacy Jenkins CI (no longer available publicly):
(cs) = community supported architecture
Please see our guides for building Mono on Mac OS X, Linux and Windows.
Note that building from Git assumes that you already have Mono installed, so please download and install the latest Mono release before trying to build from Git. This is required because the Mono build relies on a working Mono C# compiler to compile itself (also known as bootstrapping).
If you don't have a working Mono installation, you can try a slightly more risky approach: getting the latest version of the 'monolite' distribution, which contains just enough to run the 'mcs' compiler. You do this with:
# Run the following line after ./autogen.sh
make get-monolite-latestThis will download and place the files appropriately so that you can then just run:
makeThe build will then use the files downloaded by make get-monolite-latest.
You can run the mono and mcs test suites with the command: make check.
Expect to find a few test suite failures. As a sanity check, you can compare the failures you got with https://jenkins.mono-project.com/.
You can now install mono with: make install
You can verify your installation by using the mono-test-install script, it can diagnose some common problems with Mono's install. Failure to follow these steps may result in a broken installation.
Once you have installed the software, you can run a few programs:
mono program.exe runtime engine
mcs program.cs C# compiler
monodis program.exe CIL Disassembler
See the man pages for mono(1), mcs(1) and monodis(1) for further details.
acceptance-tests/ - Optional third party test suites used to validate Mono against a wider range of test cases.
data/ - Configuration files installed as part of the Mono runtime.
docs/ - Technical documents about the Mono runtime.
external/ - Git submodules for external libraries (Newtonsoft.Json, ikvm, etc).
ikvm-native/ - Glue code for ikvm.
libgc/ - The (deprecated) Boehm GC implementation.
llvm/ - Utility Makefiles for integrating the Mono LLVM fork.
m4/ - General utility Makefiles.
man/ - Manual pages for the various Mono commands and programs.
mcs/ - The class libraries, compiler and tools
class/ - The class libraries (like System.*, Microsoft.Build, etc.)
mcs/ - The Mono C# compiler written in C#
tools/ - Tools like gacutil, ikdasm, mdoc, etc.
mono/ - The core of the Mono Runtime.
arch/ - Architecture specific portions.
benchmark/ - A collection of benchmarks.
btls/ - Build files for the BTLS library which incorporates BoringSSL.
cil/ - Common Intermediate Representation, XML
definition of the CIL bytecodes.
dis/ - CIL executable Disassembler.
eglib/ - Independent implementation of the glib API.
metadata/ - The object system and metadata reader.
mini/ - The Just in Time Compiler.
profiler/ - The profiler implementation.
sgen/ - The SGen Garbage Collector implementation.
tests/ - The main runtime tests.
unit-tests/ - Additional runtime unit tests.
utils/ - Utility functions used across the runtime codebase.
msvc/ - Logic for the MSVC / Visual Studio based runtime and BCL build system.
The latter is experimental at the moment.
packaging/ - Packaging logic for the OS X and Windows Mono packages.
po/ - Translation files.
runtime/ - A directory that contains the Makefiles that link the
mono/ and mcs/ build systems.
samples/ - Some simple sample programs on uses of the Mono
runtime as an embedded library.
scripts/ - Scripts used to invoke Mono and the corresponding program.
support/ - Various support libraries.
tools/ - A collection of tools, mostly used during Mono development.
Before submitting changes to Mono, please review the contribution guidelines. Please pay particular attention to the Important Rules section.
To submit bug reports, please open an issue on the mono GitHub repo.
Please use the search facility to ensure the same bug hasn't already been submitted and follow our guidelines on how to make a good bug report.
The following are the configuration options that someone building Mono might want to use:
--with-sgen=yes,no - Generational GC support: Used to enable or
disable the compilation of a Mono runtime with the SGen garbage
collector.
mono-boehm binary and a mono-sgen binary. mono-boehm uses Boehm,
while mono-sgen uses the Simple Generational GC.--with-libgc=[included, none] - Selects the default Boehm
garbage collector engine to use.
included: (slightly modified Boehm GC) This is the default value for the Boehm GC, and it's the most feature complete, it will allow Mono to use typed allocations and support the debugger.
none: Disables the inclusion of a Boehm garbage collector.
This defaults to included.
--enable-cooperative-suspend
Labels don't display text properly on Ubuntu 23.1
Unable to install ca-certificates-mono (or equivalent) on postmarketos / Alpine Linux
Console ctor exception with terminfo files bigger than 4kb (like xterm)
Invisible MessageBoxButtons text
NameResolutionFailure for any url in proot-distro
mono builds are nondeterministic
Mono does not natively support the arm64 architecture on MacOS
installer does not respect prefix for mono-configuration-crypto
Windows forms keyboard layout (FR BÉPO)
SocketTaskExtensions.ReceiveAsync(Memory<T>) always reads zeroes.