• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

acceptance-tests/H03-May-2022-11,30410,929

data/H03-May-2022-31,14525,570

docs/H03-May-2022-14,76510,968

external/H24-Aug-2018-8,688,5607,162,827

ikvm-native/H03-May-2022-1,8011,464

libgc/H03-May-2022-100,25777,512

llvm/H03-May-2022-742603

m4/H03-May-2022-11,08410,093

man/H03-May-2022-12,17311,362

mcs/H03-May-2022-10,059,6427,983,818

mono/H03-May-2022-670,427511,934

msvc/H03-May-2022-7,1377,030

po/H03-May-2022-23,56819,589

runtime/H03-May-2022-1,057855

samples/H03-May-2022-1,5431,075

scripts/H03-May-2022-2,3281,847

support/H03-May-2022-35,06527,209

tools/H03-May-2022-11,0649,424

LICENSEH A D24-Aug-201871.8 KiB1,4431,149

Makefile.amH A D03-May-20225 KiB152120

Makefile.inH A D03-May-202233.8 KiB1,065947

NEWSH A D24-Aug-2018114 42

README.mdH A D24-Aug-201819.3 KiB564397

acinclude.m4H A D24-Aug-20185.5 KiB183171

aclocal.m4H A D24-Aug-201843.7 KiB1,2191,107

autogen.shH A D03-May-20224.6 KiB170134

code_of_conduct.mdH A D24-Aug-20182.3 KiB5139

compileH A D02-Jan-20147.2 KiB348258

config.guessH A D11-Aug-201344.2 KiB1,5591,352

config.h.inH A D24-Aug-201831.6 KiB1,331895

config.rpathH A D24-Aug-201818 KiB673569

config.subH A D11-Aug-201334.7 KiB1,7921,654

configureH A D03-May-2022936.5 KiB33,34127,655

configure.acH A D03-May-2022147 KiB4,9924,449

depcompH A D02-Jan-201423 KiB792502

install-shH A D02-Jan-201413.7 KiB528351

ltmain.shH A D03-May-2022277 KiB9,6627,310

missingH A D02-Jan-20146.7 KiB216143

mkinstalldirsH A D24-Aug-20181.8 KiB10272

mono-uninstalled.pc.inH A D24-Aug-2018239 76

test-driverH A D02-Jan-20144.2 KiB14084

winconfig.hH A D24-Aug-201817.6 KiB686101

README.md

1Mono is a software platform designed to allow developers to easily
2create cross platform applications.  It is an open source
3implementation of Microsoft's .NET Framework based on the ECMA
4standards for C# and the Common Language Runtime.
5
6The Mono project is part of the [.NET Foundation](http://www.dotnetfoundation.org/)
7
8[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/mono/mono?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
9
101. [Compilation and Installation](#compilation-and-installation)
112. [Using Mono](#using-mono)
123. [Directory Roadmap](#directory-roadmap)
134. [Contributing to Mono](#contributing-to-mono)
145. [Reporting bugs](#reporting-bugs)
156. [Configuration Options](#configuration-options)
167. [Working with Submodules](#working-with-submodules)
17
18### Build Status
19
20| OS           | Architecture       | Status                       |
21|--------------|--------------------|------------------------------|
22| Ubuntu 14.04 | amd64              | [![ubuntu-1404-amd64][1]][2] |
23| Ubuntu 14.04 | i386               | [![ubuntu-1404-i386][3]][4]  |
24| Debian 8     | armel              | [![debian-8-armel][5]][6]    |
25| Debian 8     | armhf              | [![debian-8-armhf][7]][8]    |
26| Debian 8     | arm64              | [![debian-8-arm64][9]][10]   |
27| OS X         | amd64              | [![osx-amd64][11]][12]       |
28| OS X         | i386               | [![osx-i386][13]][14]        |
29| Windows      | amd64              | [![windows-amd64][15]][16]   |
30| Windows      | i386               | [![windows-amd64][17]][18]   |
31| CentOS       | s390x (cs)         | [![centos-s390x][19]][20]    |
32| Debian 8     | ppc64el (cs)       | [![debian-8-ppc64el][21]][22]|
33
34_(cs) = community supported architecture_
35
36[1]: https://jenkins.mono-project.com/job/test-mono-mainline-linux/label=ubuntu-1404-amd64/badge/icon
37[2]: https://jenkins.mono-project.com/job/test-mono-mainline-linux/label=ubuntu-1404-amd64
38[3]: https://jenkins.mono-project.com/job/test-mono-mainline-linux/label=ubuntu-1404-i386/badge/icon
39[4]: https://jenkins.mono-project.com/job/test-mono-mainline-linux/label=ubuntu-1404-i386/
40[5]: https://jenkins.mono-project.com/job/test-mono-mainline-linux/label=debian-8-armel/badge/icon
41[6]: https://jenkins.mono-project.com/job/test-mono-mainline-linux/label=debian-8-armel/
42[7]: https://jenkins.mono-project.com/job/test-mono-mainline-linux/label=debian-8-armhf/badge/icon
43[8]: https://jenkins.mono-project.com/job/test-mono-mainline-linux/label=debian-8-armhf/
44[9]: https://jenkins.mono-project.com/job/test-mono-mainline-linux/label=debian-8-arm64/badge/icon
45[10]: https://jenkins.mono-project.com/job/test-mono-mainline-linux/label=debian-8-arm64/
46[11]: https://jenkins.mono-project.com/job/test-mono-mainline/label=osx-amd64/badge/icon
47[12]: https://jenkins.mono-project.com/job/test-mono-mainline/label=osx-amd64/
48[13]: https://jenkins.mono-project.com/job/test-mono-mainline/label=osx-i386/badge/icon
49[14]: https://jenkins.mono-project.com/job/test-mono-mainline/label=osx-i386/
50[15]: https://jenkins.mono-project.com/job/z/label=w64/badge/icon
51[16]: https://jenkins.mono-project.com/job/z/label=w64/
52[17]: https://jenkins.mono-project.com/job/z/label=w32/badge/icon
53[18]: https://jenkins.mono-project.com/job/z/label=w32/
54[19]: https://jenkins.mono-project.com/job/test-mono-mainline-community/label=centos-s390x/badge/icon
55[20]: https://jenkins.mono-project.com/job/test-mono-mainline-community/label=centos-s390x
56[21]: https://jenkins.mono-project.com/job/test-mono-mainline-community-chroot/label=debian-8-ppc64el/badge/icon
57[22]: https://jenkins.mono-project.com/job/test-mono-mainline-community-chroot/label=debian-8-ppc64el
58
59Compilation and Installation
60============================
61
62Building the Software
63---------------------
64
65Please see our guides for building Mono on
66[Mac OS X](http://www.mono-project.com/docs/compiling-mono/mac/),
67[Linux](http://www.mono-project.com/docs/compiling-mono/linux/) and
68[Windows](http://www.mono-project.com/docs/compiling-mono/windows/).
69
70Note that building from Git assumes that you already have Mono installed,
71so please download and [install the latest Mono release](http://www.mono-project.com/download/)
72before trying to build from Git. This is required because the Mono build
73relies on a working Mono C# compiler to compile itself
74(also known as [bootstrapping](http://en.wikipedia.org/wiki/Bootstrapping_(compilers))).
75
76If you don't have a working Mono installation
77---------------------------------------------
78
79If you don't have a working Mono installation, you can try a slightly
80more risky approach: getting the latest version of the 'monolite' distribution,
81which contains just enough to run the 'mcs' compiler. You do this with:
82
83    # Run the following line after ./autogen.sh
84    make get-monolite-latest
85
86This will download and place the files appropriately so that you can then
87just run:
88
89    make
90
91The build will then use the files downloaded by `make get-monolite-latest`.
92
93Testing and Installation
94------------------------
95
96You can run the mono and mcs test suites with the command: `make check`.
97
98Expect to find a few test suite failures. As a sanity check, you
99can compare the failures you got with [https://jenkins.mono-project.com/](https://jenkins.mono-project.com/).
100
101You can now install mono with: `make install`
102
103You can verify your installation by using the mono-test-install
104script, it can diagnose some common problems with Mono's install.
105Failure to follow these steps may result in a broken installation.
106
107Using Mono
108==========
109
110Once you have installed the software, you can run a few programs:
111
112* `mono program.exe` runtime engine
113
114* `mcs program.cs` C# compiler
115
116* `monodis program.exe` CIL Disassembler
117
118See the man pages for mono(1), mcs(1) and monodis(1) for further details.
119
120Directory Roadmap
121=================
122
123* `acceptance-tests/` - Optional third party test suites used to validate Mono against a wider range of test cases.
124
125* `data/` - Configuration files installed as part of the Mono runtime.
126
127* `docs/` - Technical documents about the Mono runtime.
128
129* `external/` - Git submodules for external libraries (Newtonsoft.Json, ikvm, etc).
130
131* `man/` - Manual pages for the various Mono commands and programs.
132
133* `mcs/` - The class libraries, compiler and tools
134
135  * `class/` - The class libraries (like System.*, Microsoft.Build, etc.)
136
137  * `mcs/` - The Mono C# compiler written in C#
138
139  * `tools/` - Tools like gacutil, ikdasm, mdoc, etc.
140
141* `mono/` - The core of the Mono Runtime.
142
143  * `arch/` - Architecture specific portions.
144
145  * `cil/` - Common Intermediate Representation, XML
146definition of the CIL bytecodes.
147
148  * `dis/` - CIL executable Disassembler
149
150  * `io-layer/` - The I/O layer and system abstraction for
151emulating the .NET IO model.
152
153  * `metadata/` - The object system and metadata reader.
154
155  * `mini/` - The Just in Time Compiler.
156
157* `runtime/` - A directory that contains the Makefiles that link the
158mono/ and mcs/ build systems.
159
160* `samples/` -Some simple sample programs on uses of the Mono
161runtime as an embedded library.
162
163* `scripts/` - Scripts used to invoke Mono and the corresponding program.
164
165Contributing to Mono
166====================
167
168Before submitting changes to Mono, please review the [contribution
169guidelines](http://www.mono-project.com/community/contributing/).
170Please pay particular attention to the [Important
171Rules](http://www.mono-project.com/community/contributing/#important-rules)
172section.
173
174Reporting bugs
175==============
176
177To submit bug reports, please use [Xamarin's
178Bugzilla](https://bugzilla.xamarin.com/)
179
180Please use the search facility to ensure the same bug hasn't already
181been submitted and follow our
182[guidelines](http://www.mono-project.com/community/bugs/make-a-good-bug-report/)
183on how to make a good bug report.
184
185Configuration Options
186=====================
187
188The following are the configuration options that someone building Mono
189might want to use:
190
191* `--with-sgen=yes,no` - Generational GC support: Used to enable or
192disable the compilation of a Mono runtime with the SGen garbage
193collector.
194
195  * On platforms that support it, after building Mono, you will have
196both a `mono-boehm` binary and a `mono-sgen` binary. `mono-boehm` uses Boehm,
197while `mono-sgen` uses the Simple Generational GC.
198
199* `--with-libgc=[included, none]` - Selects the default Boehm
200garbage collector engine to use.
201
202  * *included*: (*slightly modified Boehm GC*) This is the default
203value for the Boehm GC, and it's the most feature complete, it will
204allow Mono to use typed allocations and support the debugger.
205
206  * *none*:
207Disables the inclusion of a Boehm garbage collector.
208
209  * This defaults to `included`.
210
211* `--with-cooperative-gc`
212
213  * If you pass this flag the Mono runtime is configured to only use
214  the cooperative mode of the garbage collector.  If you do not pass
215  this flag, then you can control at runtime the use of the
216  cooperative GC mode by setting the `MONO_ENABLE_COOP` flag.
217
218* `--with-tls=__thread,pthread`
219
220  * Controls how Mono should access thread local storage,
221pthread forces Mono to use the pthread APIs, while
222__thread uses compiler-optimized access to it.
223
224  * Although __thread is faster, it requires support from
225the compiler, kernel and libc. Old Linux systems do
226not support with __thread.
227
228  * This value is typically pre-configured and there is no
229need to set it, unless you are trying to debug a problem.
230
231* `--with-sigaltstack=yes,no`
232
233  * **Experimental**: Use at your own risk, it is known to
234cause problems with garbage collection and is hard to
235reproduce those bugs.
236
237  * This controls whether Mono will install a special
238signal handler to handle stack overflows. If set to
239`yes`, it will turn stack overflows into the
240StackOverflowException. Otherwise when a stack
241overflow happens, your program will receive a
242segmentation fault.
243
244  * The configure script will try to detect if your
245operating system supports this. Some older Linux
246systems do not support this feature, or you might want
247to override the auto-detection.
248
249* `--with-static_mono=yes,no`
250
251  * This controls whether `mono` should link against a
252static library (libmono.a) or a shared library
253(libmono.so).
254
255  * This defaults to `yes`, and will improve the performance
256of the `mono` program.
257
258  * This only affects the `mono' binary, the shared
259library libmono.so will always be produced for
260developers that want to embed the runtime in their
261application.
262
263* `--with-xen-opt=yes,no` - Optimize code for Xen virtualization.
264
265  * It makes Mono generate code which might be slightly
266slower on average systems, but the resulting executable will run
267faster under the Xen virtualization system.
268
269  * This defaults to `yes`.
270
271* `--with-large-heap=yes,no` - Enable support for GC heaps larger than 3GB.
272
273  * This defaults to `no`.
274
275* `--enable-small-config=yes,no` - Enable some tweaks to reduce memory usage
276and disk footprint at the expense of some capabilities.
277
278  * Typically this means that the number of threads that can be created
279is limited (256), that the maximum heap size is also reduced (256 MB)
280and other such limitations that still make mono useful, but more suitable
281to embedded devices (like mobile phones).
282
283  * This defaults to `no`.
284
285* `--with-ikvm-native=yes,no` - Controls whether the IKVM JNI interface library is
286built or not.
287
288  * This is used if you are planning on
289using the IKVM Java Virtual machine with Mono.
290
291  * This defaults to `yes`.
292
293* `--with-profile4=yes,no` - Whether you want to build the 4.x profile libraries
294and runtime.
295
296  * This defaults to `yes`.
297
298* `--with-libgdiplus=installed,sibling,<path>` - Configure where Mono
299searches for libgdiplus when running System.Drawing tests.
300
301  * It defaults to `installed`, which means that the
302library is available to Mono through the regular
303system setup.
304
305  * `sibling` can be used to specify that a libgdiplus
306that resides as a sibling of this directory (mono)
307should be used.
308
309 * Or you can specify a path to a libgdiplus.
310
311* `--enable-minimal=LIST`
312
313  * Use this feature to specify optional runtime
314components that you might not want to include.  This
315is only useful for developers embedding Mono that
316require a subset of Mono functionality.
317  * The list is a comma-separated list of components that
318should be removed, these are:
319
320    * `aot`:
321Disables support for the Ahead of Time compilation.
322
323    * `attach`:
324Support for the Mono.Management assembly and the
325VMAttach API (allowing code to be injected into
326a target VM)
327
328    * `com`:
329Disables COM support.
330
331    * `debug`:
332Drop debugging support.
333
334    * `decimal`:
335Disables support for System.Decimal.
336
337    * `full_messages`:
338By default Mono comes with a full table
339of messages for error codes. This feature
340turns off uncommon error messages and reduces
341the runtime size.
342
343    * `generics`:
344Generics support.  Disabling this will not
345allow Mono to run any 2.0 libraries or
346code that contains generics.
347
348    * `jit`:
349Removes the JIT engine from the build, this reduces
350the executable size, and requires that all code
351executed by the virtual machine be compiled with
352Full AOT before execution.
353
354    * `large_code`:
355Disables support for large assemblies.
356
357    * `logging`:
358Disables support for debug logging.
359
360    * `pinvoke`:
361Support for Platform Invocation services,
362disabling this will drop support for any
363libraries using DllImport.
364
365    * `portability`:
366Removes support for MONO_IOMAP, the environment
367variables for simplifying porting applications that
368are case-insensitive and that mix the Unix and Windows path separators.
369
370    * `profiler`:
371Disables support for the default profiler.
372
373    * `reflection_emit`:
374Drop System.Reflection.Emit support
375
376    * `reflection_emit_save`:
377Drop support for saving dynamically created
378assemblies (AssemblyBuilderAccess.Save) in
379System.Reflection.Emit.
380
381    * `shadow_copy`:
382Disables support for AppDomain's shadow copies
383(you can disable this if you do not plan on
384using appdomains).
385
386    * `simd`:
387Disables support for the Mono.SIMD intrinsics
388library.
389
390    * `ssa`:
391Disables compilation for the SSA optimization
392framework, and the various SSA-based optimizations.
393
394* `--enable-llvm`
395* `--enable-loadedllvm`
396
397  * This enables the use of LLVM as a code generation engine
398for Mono.  The LLVM code generator and optimizer will be
399used instead of Mono's built-in code generator for both
400Just in Time and Ahead of Time compilations.
401
402  * See http://www.mono-project.com/docs/advanced/mono-llvm/ for the
403full details and up-to-date information on this feature.
404
405  * You will need to have an LLVM built that Mono can link
406against.
407
408  * The `--enable-loadedllvm` variant will make the LLVM backend
409into a runtime-loadable module instead of linking it directly
410into the main mono binary.
411
412* `--enable-big-arrays` - Enable use of arrays with indexes larger
413than Int32.MaxValue.
414
415  * By default Mono has the same limitation as .NET on
416Win32 and Win64 and limits array indexes to 32-bit
417values (even on 64-bit systems).
418
419  * In certain scenarios where large arrays are required,
420you can pass this flag and Mono will be built to
421support 64-bit arrays.
422
423  * This is not the default as it breaks the C embedding
424ABI that we have exposed through the Mono development
425cycle.
426
427* `--enable-parallel-mark`
428
429  * Use this option to enable the garbage collector to use
430multiple CPUs to do its work.  This helps performance
431on multi-CPU machines as the work is divided across CPUS.
432
433  * This option is not currently the default on OSX
434as it runs into issues there.
435
436  * This option only applies to the Boehm GC.
437
438* `--enable-dtrace`
439
440  * On Solaris and MacOS X builds a version of the Mono
441runtime that contains DTrace probes and can
442participate in the system profiling using DTrace.
443
444* `--disable-dev-random`
445
446  * Mono uses /dev/random to obtain good random data for
447any source that requires random numbers.   If your
448system does not support this, you might want to
449disable it.
450
451  * There are a number of runtime options to control this
452also, see the man page.
453
454* `--with-csc=roslyn,mcs,default`
455
456  * Use this option to configure which C# compiler to use.  By default
457    the configure script will pick Roslyn, except on platforms where
458    Roslyn does not work (Big Endian systems) where it will pick mcs.
459
460    If you specify "mcs", then Mono's C# compiler will be used.  This
461    also allows for a complete bootstrap of Mono's core compiler and
462    core libraries from source.
463
464    If you specify "roslyn", then Roslyn's C# compiler will be used.
465    This currently uses Roslyn binaries.
466
467* `--enable-nacl`
468
469  * This configures the Mono compiler to generate code
470suitable to be used by Google's Native Client:
471http://code.google.com/p/nativeclient/
472
473  * Currently this is used with Mono's AOT engine as
474Native Client does not support JIT engines yet.
475
476* `--enable-wasm`
477
478  * Use this option to configure mono to run on WebAssembly. It will
479    set both host and target to the WebAssembly triplet. This overrides
480    the values passed to `--host` or `--target` and ignored what config.sub guesses.
481
482    This is a workaround to enable usage of old automake versions that don't
483    recognize the wasm triplet.
484
485
486Working With Submodules
487=======================
488
489Mono references several external git submodules, for example
490a fork of Microsoft's reference source code that has been altered
491to be suitable for use with the Mono runtime.
492
493This section describes how to use it.
494
495An initial clone should be done recursively so all submodules will also be
496cloned in a single pass:
497
498	$ git clone --recursive git@github.com:mono/mono
499
500Once cloned, submodules can be updated to pull down the latest changes.
501This can also be done after an initial non-recursive clone:
502
503	$ git submodule update --init --recursive
504
505To pull external changes into a submodule:
506
507	$ cd <submodule>
508	$ git pull origin <branch>
509	$ cd <top-level>
510	$ git add <submodule>
511	$ git commit
512
513By default, submodules are detached because they point to a specific commit.
514Use `git checkout` to move back to a branch before making changes:
515
516	$ cd <submodule>
517	$ git checkout <branch>
518	# work as normal; the submodule is a normal repo
519	$ git commit/push new changes to the repo (submodule)
520
521	$ cd <top-level>
522	$ git add <submodule> # this will record the new commits to the submodule
523	$ git commit
524
525To switch the repo of a submodule (this should not be a common or normal thing
526to do at all), first edit `.gitmodules` to point to the new location, then:
527
528	$ git submodule sync -- <path of the submodule>
529	$ git submodule update --recursive
530	$ git checkout <desired new hash or branch>
531
532The desired output diff is a change in `.gitmodules` to reflect the
533change in the remote URL, and a change in /<submodule> where you see
534the desired change in the commit hash.
535
536License
537=======
538
539See the LICENSE file for licensing information, and the PATENTS.TXT
540file for information about Microsoft's patent grant.
541
542Mono Trademark Use Policy
543=========================
544
545The use of trademarks and logos for Mono can be found [here] (http://www.dotnetfoundation.org/legal/mono-tm).
546
547Maintaining the Class Library Solution Files
548============================================
549
550Mono now ships with a solution file that can be used to build the
551assemblies from an IDE.  Either by opening the topmost `net_4_x.sln`
552file, or to by loading one of the individual `csproj` files located in
553each directory.
554
555These are maintained by extracting the configuration information from
556our Makefiles, which as of May 2016 remain the canonical location for
557configuration information.
558
559When changes are made to the Makefiles, a user would need to run the
560following command to re-generate the solution files at the top level:
561
562	$ make update-solution-files
563
564