Mono (software)
| Company type | Open source software project |
|---|---|
| Industry | Software development |
| Predecessor | Ximian |
| Founded | July 19, 2001 |
| Founder | Miguel de Icaza |
| Fate | Ownership transferred to WineHQ community in August 2024 |
Area served | Cross-platform (Linux, Windows, macOS, mobile platforms) |
Key people | Miguel de Icaza, Rolf Bjarne Kvinge |
| Products | Mono software framework, Moonlight (discontinued) |
| Owner | WineHQ community (since August 2024) |
| Parent | Previously Microsoft, Xamarin, Novell, Ximian |
| Website | www |
Mono is an open-source and freely available software framework aimed at enabling applications built for the .NET Framework to operate on Linux and various other platforms. Originally developed by Ximian, which was later acquired by Novell, the project’s development continued under Xamarin before being taken over by Microsoft. In August 2024, ownership of Mono was handed over by Microsoft to the WineHQ community.
History
The launch of the .NET Framework by Microsoft in June 2000 introduced a "new platform based on Internet standards," with its core Common Language Infrastructure standardized as "ECMA-335" in December of the same year. Seeing the opportunity to enhance developer efficiency, Miguel de Icaza from Ximian initiated efforts to create a Linux-compatible version. Despite limited resources, Ximian publicly unveiled the open-source Mono initiative on July 19, 2001, during the O'Reilly conference.
After three years of development work, Mono 1.0 became available on June 30, 2004. The project broadened its scope beyond Linux desktop applications to support diverse architectures and operating systems, including embedded environments.
In 2003, Novell acquired Ximian. Following Novell’s purchase by Attachmate in April 2011 and subsequent staff reductions, the future of Mono appeared uncertain.
On May 16, 2011, Miguel de Icaza announced that Mono’s development would proceed under Xamarin, a company he established after departing from Novell, with the original Mono team joining him. Xamarin intended to redevelop proprietary .NET frameworks for iOS and Android, since Novell retained rights to MonoTouch and Mono for Android at that time. Although concerns arose regarding competition and intellectual property with Attachmate, in July 2011 Novell (under Attachmate) granted Xamarin a perpetual license for Mono and associated products, formally transferring stewardship.
Microsoft revealed its acquisition of Xamarin on February 24, 2016, thereby incorporating Mono within its broader development ecosystem.
In August 2024, Microsoft passed control of Mono to WineHQ, the group responsible for the Windows compatibility layer Wine.
Current status and roadmap
The latest release of Mono is version 6.12.0 (), delivering the fundamental API set of the .NET Framework along with support for Visual Basic.NET and C# 7.0. It encompasses features such as LINQ to Objects, XML handling, and SQL. While support for Windows Forms 2.0 exists, it remains incomplete and is no longer actively maintained. Version 4.0 incorporated Microsoft source code contributed as part of the .NET Core initiative.
As of January 14, 2021, Mono implements all functionalities found in .NET 4.7 except for Windows Presentation Foundation (WPF) and Windows Workflow Foundation (WF), which are excluded due to their complexity. Support for Windows Communication Foundation (WCF) and the asynchronous ASP.NET stack is partial; however, System.Web and WCF are considered strong candidates for expedited porting from the .NET reference source. Certain missing components from the .NET Framework are under active experimentation within a Mono subproject named Olive.
Mono also provides a compiler and runtime environment for Visual Basic .NET applications, currently maintained by Rolf Bjarne Kvinge.
Moonlight
Moonlight is an open-source project designed to implement Microsoft Silverlight and has been part of Mono since version 1.9. The initial release, Moonlight 1.0, supported Silverlight 1.0 APIs (launched January 20, 2009). Moonlight 2.0 expanded support to include Silverlight 2.0 and selected features from Silverlight 3.0. In February 2010, a preview version of Moonlight 3.0 was made available, incorporating updated compatibility with Silverlight 3.
The development of Moonlight ceased on May 29, 2012, primarily due to Microsoft's imposed "artificial restrictions" on desktop usage and the limited adoption of Silverlight on the web. Additionally, Microsoft officially deprecated Silverlight by that year.
Mono components
Mono is organized into three main categories:
- Core components
- Mono/Linux/GNOME development stack
- Microsoft compatibility stack
The core components consist of the C# compiler, the virtual machine implementing the Common Language Infrastructure, and essential class libraries. These are built according to the Ecma-334 and Ecma-335 specifications, delivering a standards-compliant, open-source CLI virtual machine. Microsoft provides these standards under their Community Promise license.
The Mono/Linux/GNOME development stack supplies tools for building applications utilizing existing GNOME and other open-source libraries. This includes Gtk# for graphical user interface creation, Mozilla libraries supporting the Gecko rendering engine, Unix integration through Mono.Posix, database connectivity modules, security frameworks, and support for the XML schema language RelaxNG. Gtk# allows Mono applications to seamlessly integrate with the GNOME desktop environment. Database connectivity is supported for systems such as db4o, Firebird, Microsoft SQL Server (MSSQL), MySQL, Open Database Connectivity (ODBC), Oracle, PostgreSQL, SQLite, among others.
The Microsoft compatibility stack enables porting of Windows .NET applications to the Linux platform. It contains implementations of ADO.NET, ASP.NET, and Windows Forms (utilizing libgdiplus). As these components are not covered by Ecma standards, some may still be subject to patent-related issues.
Framework architecture
Mono's architecture includes several critical elements:
- Code Execution Engine
- Class Libraries
- Base Class Library
- .NET Compatibility Class Libraries
- Mono-specific libraries:
- Cross-platform libraries usable by both Mono and .NET (such as Gtk#, Mono.Cecil, Mono.CSharp, Text.Templating)
- Unix-targeted libraries (including POSIX, Filesystem in Userspace (FUSE), curses)
- Platform-specific bindings for Mac, iOS, Android, MeeGo
- CLI Assemblies
- CLI Metadata
- Mono's implementation of the Common Language Runtime
- Compliant with ECMA's Common Language Infrastructure and .NET CLR standards
- Extensions unique to Mono:
- Support for Mono.SIMD
- Implementation of co-routines and continuations
- Native interoperability services along with COM interop capabilities
- Security mechanisms such as the Transparent Code Framework
Code Execution Engine
The runtime component of Mono incorporates a code execution engine that converts ECMA-standardized CIL bytecode into native machine instructions. It supports multiple processor architectures including ARM, 32-bit MIPS, SPARC, PowerPC, z/Architecture, IA-32, x86-64, and IA-64.
This code generator functions in three distinct modes:
- Just-in-time (JIT) compilation: dynamically translates ECMA CIL bytecode into native instructions during program execution.
- Ahead-of-Time (AOT) compilation: pre-compiles ECMA CIL bytecode into native code stored in OS- and CPU-specific files to minimize runtime compilation overhead. Some runtime elements still rely on JIT compilation; hence AOT outputs are not fully independent.
- Full Static Compilation: builds upon AOT by producing all necessary trampolines, wrappers, and proxies within a static binary suitable for static linking without any JIT involvement. This approach is employed on platforms such as Apple's iOS, Sony's PlayStation 3, and Microsoft's Xbox 360.
Starting with Mono 2.6, LLVM can be utilized as an alternative code generation backend to boost performance in computation-heavy tasks. From the Mono 2.7 preview onward, users can select the code generator at launch using --llvm or --nollvm, with the default being Mono’s fast-start engine. Since version 5.18, LLVM support is enabled by default while falling back to Mono’s native generator when LLVM lacks support for specific scenarios.
Garbage collector
Starting with Mono 2.8, the runtime incorporated two garbage collection mechanisms: a generational collector alongside the Boehm–Demers–Weiser Conservative Garbage Collector. The Boehm collector, however, showed tendencies toward memory leak issues in some long-duration server environments, which restricted its practicality.
With the release of version 3.1.1, Mono made the Simple Generational GC (SGen-GC) its default garbage collector. SGen utilizes a generational approach by initially allocating new objects in a nursery space; objects that persist are then promoted to an older generation heap. This method enhances efficiency by concentrating collection efforts on ephemeral objects while maintaining stable long-lived ones.
To further improve performance, SGen allocates memory pools on a per-thread basis to minimize contention during allocation. Large objects are handled separately within a specialized Large Object Section using a mark-and-sweep strategy, reducing the overhead of copying sizable data when promoting objects.
Class library
The class library provides an extensive collection of development tools, predominantly authored in C# but accessible from any .NET language compliant with the Common Language Specification. It is structured into namespaces and distributed in shared libraries known as assemblies. This class library forms the core of what is commonly referred to as the .NET Framework.
Namespaces and assemblies
Namespaces serve to logically organize related classes in a hierarchical manner to prevent naming collisions, typically employing dot-separated identifiers such as System.IO or System.Net. Developers can create custom namespaces by defining namespace blocks.
Assemblies represent the physical containers of class libraries, commonly implemented as .dll files including examples like mscorlib.dll, System.dll, and System.Data.dll. A single namespace can span multiple assemblies, and assemblies themselves may comprise several files.
Common Language Infrastructure and Common Language Specification
The CLI, realized by Mono’s CLR, compiles and executes .NET applications conforming to the ECMA standard. Execution occurs through invoking the runtime with suitable parameters.
The Common Language Specification (CLS), outlined in ECMA-335 chapter 6, defines standardized interfaces and conventions for the CLI. Mono’s compiler generates CLS-compliant Common Intermediate Language binaries that the runtime processes. The ECMA standard delineates frameworks that adhere to CLS requirements.
Managed and unmanaged code
Within .NET/Mono applications, all code runs as managed, subject to CLI-controlled memory and thread management. Integration with legacy or unmanaged code is facilitated through System.Runtime.InteropServices, allowing C# bindings. Numerous Mono libraries, such as Gtk#, leverage this interoperability feature.
Mono-specific innovations
Mono enhances core C# and CLI standards with unique features designed to boost performance and developer adaptability:
- A C# Compiler available as a service (exposed as a library)
- An interactive C# shell environment
- SIMD capabilities via the Mono.SIMD namespace for direct CPU SIMD instruction mapping
- Support for fully static compilation of .NET code (employed in Mono/iPhone and Mono/PS3)
- Mono coroutines enabling micro-threading and continuation support, advantageous for game development
- Live process assembly injection capability
- LLVM backend integration for Just-In-Time compilation
- Direct C++ interoperability through Cxxi and CppSharp
Mono’s compatibility spans numerous operating systems and hardware architectures, significantly expanding its applicability across markets.
System requirements
Compatible with Windows 7, Windows 8, Windows 8.1, Windows 10, macOS, and Linux operating systems.
Related projects
Numerous initiatives build upon Mono, allowing developers to utilize it in diverse settings:
Cross-platform:
- Banshee Media Player (inactive), a music player designed with Mono and Gtk#, supporting multiple C# media libraries.
- Beagle (no longer maintained), a search tool for Unix systems.
- Gecko#, a set of bindings for embedding the Mozilla Gecko rendering engine.
- Gtk#, C# wrappers for GTK and GNOME libraries available on Linux, macOS, and Windows.
- Mono Migration Analyzer (MoMA), a utility to detect Windows .NET code incompatible with Mono; succeeded by Microsoft's .NET Portability Analyzer.
- MonoCross, a cross-platform model–view–controller framework that shares the Model and Controller layers across platforms, requiring Xamarin.iOS and Xamarin.Android.
- MvvmCross, a mobile-focused cross-platform Model View ViewModel framework supporting Xamarin.iOS and Xamarin.Android.
- MonoDevelop, an open-source integrated development environment supporting ASP.NET, Gtk#, Meego, MonoTouch, and Silverlight/Moonlight projects.
- Moonlight (discontinued), a Silverlight implementation based on Mono.
- OpenTK, managed bindings for OpenGL, OpenCL, and OpenAL libraries.
- QtSharp, C# bindings targeting the Qt application framework.
- Resco MobileBusiness and Resco MobileCRM, cross-platform mobile client solutions synchronized with Microsoft Dynamics CRM.
- ServiceStack, a high-performance open-source .NET REST web services framework facilitating XML, JSON, and SOAP service development.
- SparkleShare, an open-source client for cloud storage and file synchronization.
- Tao (replaced by OpenTK), providing graphics and gaming bindings including OpenGL and SDL support.
- Xwt, a graphical user interface toolkit offering a consistent API with native appearance across platforms; supports WPF and Gtk backends on Windows, Cocoa and Gtk on macOS, and Gtk on Linux. Xwt was partially utilized in creating Xamarin Studio.
macOS:
- Cocoa#, wrappers around the native Cocoa API on macOS (now deprecated).
- Monobjc, macOS programming bindings.
- MonoMac, updated macOS bindings inspired by the MonoTouch API design.
Mobile platforms:
- MonoDroid – Mono implementation for Android with access to Android APIs.
- MonoTouch – Mono tailored for iPhone, iPad, and iPod Touch devices with iOS API integration.
Windows:
- MonoTools for Visual Studio – a Visual Studio extension allowing developers on Windows to target Linux and macOS environments directly within Visual Studio; integrates with SUSE Studio.
Other implementations
Microsoft provides a .NET 2.0 version for Windows XP called the Shared Source CLI (Rotor), distributed under a shared source license that limits commercial usage. The now-discontinued Portable.NET project was formerly maintained by the Free Software Foundation.
MonoDevelop
MonoDevelop is an open-source integrated development environment primarily designed for C# and various other .NET languages such as Nemerle, Boo, and Java through IKVM. It additionally accommodates programming in languages like C, C++, Python, and Vala. Originating as a Gtk# adaptation of SharpDevelop, MonoDevelop has matured into a robust IDE tailored for Mono developers, featuring capabilities including class management, intelligent code completion, GUI design via Stetic, project handling, and an integrated debugging system. The MonoDoc browser enhances collaboration by offering editable API documentation alongside sample code.
Xamarin.iOS and Xamarin.Android
Produced by Xamarin, Xamarin.iOS and Xamarin.Android bring the Mono runtime to iPhone and Android mobile platforms. Initially proprietary software,<ref> these tools became open-source and free after Microsoft's acquisition of Xamarin in 2016, with the Mono runtime reissued under the MIT license.
Xamarin.iOS
Xamarin.iOS, once known as MonoTouch, empowers developers to create applications in C# and .NET for iPhone, iPod, and iPad devices. Built upon the Mono framework and developed in partnership with Novell, Xamarin.iOS compiles applications into native machine code optimized for Apple hardware while adhering to iOS restrictions against just-in-time compilation.
The Xamarin.iOS ecosystem comprises:
- Compilers such as the Mono C# compiler along with third-party options like RemObject's Oxygene
- Core .NET framework libraries
- SDK tools including a linker for reducing code size, the mtouch native compiler, and deployment utilities integrated with Interface Builder
- Bindings to native CocoaTouch APIs
- The Xamarin Studio integrated development environment
Xamarin Studio functions as the main IDE, offering integration with Xcode and the iOS simulator.
In 2010, Apple's temporary limitations on supported development languages introduced uncertainty for MonoTouch and similar platforms. These restrictions were subsequently eased, permitting development in languages beyond C, C++, and Objective-C, thereby securing Xamarin.iOS's continued presence within Apple's ecosystem.
Version history
| Date | Version | Notes |
|---|---|---|
| 2009-09-14 | MonoTouch 1.0 | Initial release |
| 2010-04-05 | MonoTouch 2.0 | Added iPad support |
| 2010-04-16 | MonoTouch 3.0 | Support for iPhone 4 |
| 2011-04-06 | MonoTouch 4.0 | Compatibility with iOS 4 |
| 2011-10-12 | MonoTouch 5.0 | Support for iOS 5 |
| 2012-09-19 | MonoTouch 6.0 | Support for iOS 6 |
| 2013-02-20 | Xamarin.iOS 6.2 | Introduced Visual Studio integration |
| 2013-07-24 | Xamarin.iOS 6.4 | Added .NET 4.5 async/await features |
| 2013-06-19 | Xamarin.iOS 7.0 | Support for Xcode 5 and iOS 7 |
| 2014-09-10 | Xamarin.iOS 8.0 | Compatibility with iOS 8 and Xcode 6 |
| 2015-09-16 | Xamarin.iOS 9.0 | Support for iOS 9 and Xcode 7 |
| 2016-09-13 | Xamarin.iOS 10.0 | Added support for iOS 10 and Xcode 8 |
| 2017-09-19 | Xamarin.iOS 11.0 | Enabled support for iOS 11 and Xcode 9 |
| 2018-09-14 | Xamarin.iOS 12.0 | Compatible with iOS 12 and Xcode 10 |
| 2019-09-13 | Xamarin.iOS 13.0 | Support added for iOS 13 and Xcode 11 |
| 2020-09-20 | Xamarin.iOS 14.0 | Support for iOS 14 and Xcode 12 |
Xamarin.Android
Xamarin.Android, originally known as Mono for Android and initially created by Novell before development was taken over by Xamarin, represents a proprietary adaptation of Mono tailored for Android devices. Its debut occurred on April 6, 2011. This platform empowers developers to craft cross-platform applications capable of operating across various mobile systems. Miguel de Icaza emphasized the objective of enabling developers to reuse core engine and business logic across different platforms, requiring only the user interface to be adapted for platform-specific APIs.
In August 2010, Microsoft assured that the .NET port to Android via Mono would be safeguarded under the Microsoft Community Promise Agreement, preventing legal disputes similar to Oracle's case against Google over Java.
The Xamarin.Android framework comprises:
- The Mono runtime environment
- A designer for Android user interfaces
- Libraries including:
- Core .NET class libraries
- Wrappers for native Android/Java APIs
- SDK tools facilitating packaging, deployment, and debugging processes
- Integration with Xamarin Studio and Visual Studio 2010, supporting UI design, remote debugging, and deployment
CocoaSharp
Cocoa# (also called CocoaSharp) served as a bridge framework on Mac OS X that allowed applications running on the Mono runtime to interact with the Cocoa API. It was launched on August 12, 2004, and bundled with Mono starting from version 1.0.6 (February 18, 2005). However, it has been deprecated since 2008.
Monobjc
Monobjc succeeded CocoaSharp by providing .NET developers access to most Mac OS X APIs, including Cocoa, without needing native code while delivering a fully native user interface.
Xamarin.Mac
Xamarin.Mac is a library designed to enable .NET and C# applications to execute seamlessly on Mac computers.
License
Mono is distributed under a dual-license model by Xamarin, akin to licensing approaches used by Qt and Mozilla Application Suite. The C# compiler and related tools are licensed under GNU GPLv2 (with source code also accessible under the MIT X11 License starting from Mono 2.0), runtime libraries fall under LGPLv2, and class libraries are covered by the MIT License—thus classifying Mono as free and open-source software.
The licensing of the C# compiler transitioned from GPL to MIT X11 to allow reuse in contexts restricted by GPL, such as:
- Mono's Compiler as a Service (CaaS)
- The interactive Mono shell
- The embeddable C# compiler component
- Implementation of the dynamic binder for C# 4.0
- Parsing and AST graph functionality within MonoDevelop
After Microsoft's acquisition of Xamarin on March 18, 2016, at Build 2016 Microsoft announced that Mono would be fully relicensed under the MIT License, eliminating previous commercial licensing obligations. Microsoft also committed not to enforce patents against anyone using or distributing Mono. Furthermore, Xamarin contributed the Mono Project to the .NET Foundation.
Software developed with Mono
A wide array of applications spanning multiple industries have been built utilizing the Mono application programming interface (API) alongside C#. Prominent Linux desktop applications include Banshee, Beagle, F-Spot, Gbrainy, Docky/GNOME Do, MonoTorrent, Pinta, and Tomboy. Additionally, the macOS edition of Logos 5 Bible Study Software is developed on top of Mono.
In the gaming sector, titles like The Sims 3 and Second Life utilize Mono for scripting purposes. Platforms such as OpenSimulator and game engines including Unity and MonoGame also rely on Mono. The strategy game OpenRA distributes its Apple Disk Image and Linux AppImage packages with embedded Mono to reduce external dependencies.
Version history
| Date | Version | Details |
|---|---|---|
| ||
| ||
| ||
| ||
| ||
| ||
| ||
| ||
| ||
| ||
| ||
| ||
| ||
| ||
| ||
| ||
| ||
| ||
| ||
| ||
| ||
| ||
| ||
| ||
| ||
| ||
| ||
| ||
| ||
| ||
| ||
| ||
| ||
|
See also
- Common Language Runtime
- .NET Framework
- .NET, the open-source evolution of the .NET Framework
- Standard Libraries (CLI)
- Base Class Library (BCL)
- Comparison of application virtual machines
- DotGNU – A free software initiative that includes Portable.NET
- MonoDevelop – An open-source IDE supporting Mono and Microsoft's .NET Framework
- Moonlight (runtime), an open-source Silverlight implementation developed by the Mono Project
- Shared Source Common Language Infrastructure – Microsoft's shared source version of .NET, previously known as Rotor
- mod_mono – An Apache HTTP Server module that facilitates hosting of ASP.NET applications using Mono
Sources
- This article contains content from Mono's homepage, licensed under the GNU Free Documentation License.
External links
- Official Mono website
- MonoTouch – A port targeting Apple Inc.'s handheld devices