Home

Awesome

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

Gitter

  1. Compilation and Installation
  2. Using Mono
  3. Directory Roadmap
  4. Contributing to Mono
  5. Reporting bugs
  6. Configuration Options
  7. Working with Submodules

Build Status

OSArchitectureStatus
Debian 9amd64debian-9-amd64
Debian 9i386debian-9-i386
Debian 9armeldebian-9-armel
Debian 9armhfdebian-9-armhf
Debian 9arm64debian-9-arm64
OS Xamd64osx-amd64
OS Xi386osx-i386
Windowsamd64windows-amd64
Windowsi386windows-i386
CentOSs390x (cs)centos-s390x
Debian 9ppc64el (cs)debian-9-ppc64el
AIX 6.1ppc64 (cs)aix-ppc64
FreeBSD 12amd64 (cs)freebsd-amd64

(cs) = community supported architecture

Compilation and Installation

Building the Software

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

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:

make

The build will then use the files downloaded by make get-monolite-latest.

Testing and Installation

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.

Using Mono

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.

Directory Roadmap

Contributing to Mono

Before submitting changes to Mono, please review the contribution guidelines. Please pay particular attention to the Important Rules section.

Reporting bugs

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.

Configuration Options

The following are the configuration options that someone building Mono might want to use:

  If you specify "roslyn", then Roslyn's C# compiler will be used. This currently uses Roslyn binaries.

Working With Submodules

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 git@github.com: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

By default, submodules are detached because they point to a specific commit. Use git checkout 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

To switch the repo of a submodule (this should not be a common or normal thing to do at all), first edit .gitmodules 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>

The desired output diff is a change in .gitmodules to reflect the change in the remote URL, and a change in /<submodule> where you see the desired change in the commit hash.

License

See the LICENSE file for licensing information, and the PATENTS.TXT file for information about Microsoft's patent grant.

Mono Trademark Use Policy

The use of trademarks and logos for Mono can be found here.

Maintaining the Class Library Solution Files

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.sln file, or to by loading one of the individual csproj files 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