Mono open source ECMA CLI, C# and .NET implementation.
The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:
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
| OS | Architecture | Status | |--------------|--------------------|------------------------------| | Debian 9 | amd64 | | | Debian 9 | i386 | | | Debian 9 | armel | | | Debian 9 | armhf | | | Debian 9 | arm64 | | | OS X | amd64 | | | OS X | i386 | | | Windows | amd64 | | | Windows | i386 | | | CentOS | s390x (cs) | | | Debian 9 | ppc64el (cs) | | | AIX 6.1 | ppc64 (cs) | | | FreeBSD 12 | amd64 (cs) | |
(cs) = community supported architecture
Note that building from Git assumes that you already have Mono installed, so please download and install the latest Mono releasebefore 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-latest
This will download and place the files appropriately so that you can then just run:
The build will then use the files downloaded by
You can run the mono and mcs test suites with the command:
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:
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:
See the man pages for mono(1), mcs(1) and monodis(1) for further details.
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 ourguidelineson how to make a good bug report.
The following are the configuration options that someone building Mono might want to use:
- Generational GC support: Used to enable or disable the compilation of a Mono runtime with the SGen garbage collector. - On platforms that support it, after building Mono, you will have both a
binary and a
uses Boehm, while
mono-sgen ``` uses the Simple Generational GC.
, it will turn stack overflows into the StackOverflowException. Otherwise when a stack overflow happens, your program will receive a segmentation fault.
should link against a static library (libmono.a) or a shared library (libmono.so).
, and will improve the performance of the
, which means that the library is available to Mono through the regular system setup.
can be used to specify that a libgdiplus that resides as a sibling of this directory (mono) should be used.
: Disables support for the Ahead of Time compilation.
: Support for the Mono.Management assembly and the VMAttach API (allowing code to be injected into a target VM)
: Disables COM support.
: Drop debugging support.
: Disables support for System.Decimal.
: By default Mono comes with a full table of messages for error codes. This feature turns off uncommon error messages and reduces the runtime size.
: Generics support. Disabling this will not allow Mono to run any 2.0 libraries or code that contains generics.
: Removes the JIT engine from the build, this reduces the executable size, and requires that all code executed by the virtual machine be compiled with Full AOT before execution.
: Disables support for large assemblies.
: Disables support for debug logging.
: Support for Platform Invocation services, disabling this will drop support for any libraries using DllImport.
: Removes support for MONO_IOMAP, the environment variables for simplifying porting applications that are case-insensitive and that mix the Unix and Windows path separators.
: Disables support for the default profiler.
: Drop System.Reflection.Emit support
: Drop support for saving dynamically created assemblies (AssemblyBuilderAccess.Save) in System.Reflection.Emit.
: Disables support for AppDomain's shadow copies (you can disable this if you do not plan on using appdomains).
: Disables support for the Mono.SIMD intrinsics library.
If you specify "mcs", then Mono's C# compiler will be used. This also allows for a complete bootstrap of Mono's core compiler and core libraries from source.
If you specify "roslyn", then Roslyn's C# compiler will be used. This currently uses Roslyn binaries.
and ignored what config.sub guesses.
This is a workaround to enable usage of old automake versions that don't recognize the wasm triplet.
Mono references several external git submodules, for example a fork of Microsoft's reference source code that has been altered to be suitable for use with the Mono runtime.
This section describes how to use it.
An initial clone should be done recursively so all submodules will also be cloned in a single pass:
$ git clone --recursive [email protected]:mono/mono
Once cloned, submodules can be updated to pull down the latest changes. This can also be done after an initial non-recursive clone:
$ git submodule update --init --recursive
To pull external changes into a submodule:
$ cd <submodule> $ git pull origin <branch> $ cd <top-level> $ git add <submodule> $ git commit </submodule></top-level></branch></submodule>
By default, submodules are detached because they point to a specific commit. Use
to move back to a branch before making changes:
$ cd <submodule> $ git checkout <branch> # work as normal; the submodule is a normal repo $ git commit/push new changes to the repo (submodule) $ cd <top-level> $ git add <submodule> # this will record the new commits to the submodule $ git commit </submodule></top-level></branch></submodule>
To switch the repo of a submodule (this should not be a common or normal thing to do at all), first edit
to point to the new location, then:
$ git submodule sync -- <path of the submodule> $ git submodule update --recursive $ git checkout <desired new hash or branch> </desired></path>
The desired output diff is a change in
to reflect the change in the remote URL, and a change in / where you see the desired change in the commit hash.
See the LICENSE file for licensing information, and the PATENTS.TXT file for information about Microsoft's patent grant.
The use of trademarks and logos for Mono can be found here.
Mono now ships with a solution file that can be used to build the assemblies from an IDE. Either by opening the topmost
net_4_x.slnfile, or to by loading one of the individual
csprojfiles located in each directory.
These are maintained by extracting the configuration information from our Makefiles, which as of May 2016 remain the canonical location for configuration information.
When changes are made to the Makefiles, a user would need to run the following command to re-generate the solution files at the top level:
$ make update-solution-files