2 .\" mono-config configuration page.
5 .\" Miguel de Icaza (miguel@gnu.org)
6 .\" Paolo Molaro (lupus@ximian.com)
10 mono-config \- Mono runtime file format configuration
12 The Mono runtime will load configuration data from the
13 installation prefix /etc/mono/config file, the ~/.mono/config or from
14 the file pointed by the MONO_CONFIG environment variable.
16 For each assembly loaded a config file with the name:
17 /path/to/the/assembly.exe.config is loaded as well as the
18 ~/.mono/assemblies/ASSEMBLY/ASSEMBLY.EXT.config file.
20 This file controls the behavior of the runtime.
22 The file contains an XML-like file with various sections, all of them
25 section (It actually uses GMarkup
28 This page describes the Unix-specific and Mono-specific extensions to
29 the configuration file; For complete details, see the
30 http://www.mono-project.com/Config web page.
31 .SH <dllmap> directive
32 You use the dllmap directive to map shared libraries referenced by
33 P/Invoke in your assemblies to a different shared library.
35 This is typically used to map Windows libraries to Unix library names.
38 element takes two attributes:
41 This should be the same string used in the DllImport attribute, optionally
42 prefixed with "i:" to indicate that the string must be matched in a
46 This should be the name of the library where the function can be found:
47 this name should be suitable for use with the platform native shared library
48 loading routines (dlopen etc.), so you may want to check the manpages for that, too.
49 .SH <dllentry> directive
50 This directive can be used to map a specific dll/function pair to a different
51 library and also a different function name. It should appear inside a
53 element with only the dll attribute specified.
57 element takes 3 attributes:
60 This is the target library, where the function can be found.
63 This is the name of the function as it appears in the metadata: it is the name
64 of the P/Invoke method.
67 This is the name of the function to lookup instead of the name specified in the
69 .SH Mapping based on operating system and cpu
74 elements allow the following two attributes which make it easy to use a single
75 configuration file and support multiple operating systems and architectures with
76 different mapping requirements:
79 This is the name of the operating system for which the mapping should be applied.
80 Allowed values are: linux, osx, solaris, freebsd, openbsd, netbsd, windows, aix, hpux.
83 This is the name of the architecture for which the mapping should be applied.
84 Allowed values are: x86, x86-64, sparc, ppc, s390, s390x, arm, mips,
88 This is the size of registers on the target architecture, it can be
91 The attribute value for both attributes can be a comma-separated list of the allowed
92 values. Additionally, the first character may be a
94 to reverse the meaning. An attribute value of "!windows,osx", for example, would mean
95 that the entry is considered on all operating systems, except on Windows and OS X.
96 No spaces are allowed in any part of the value.
98 Note that later entries will override the entries defined earlier in the file.
100 The following example maps references to the `cygwin1.dll' shared
101 library to the `libc.so.6' file.
104 <dllmap dll="i:cygwin1.dll" target="libc.so.6"/>
107 The library name in the DllImport attribute is allowed to be in any
108 case variant, like the following examples:
111 [DllImport ("cygwin1.dll")]
112 [DllImport ("Cygwin1.dll")]
113 [DllImport ("cygwiN1.Dll")]
116 This one maps the following C# method:
119 static extern void somefunction ();
125 , but to the same function in the library
127 when running under the Solaris and FreeBSD operating systems.
131 <dllentry dll="libdifferent.so" name="somefunction" target="differentfunction" />
132 <dllentry os="solaris,freebsd" dll="libanother.so" name="somefunction" target="differentfunction" />
138 .BR mono(1), monodis(1), mint(1)