1Mono(Mono 1.0) Mono(Mono 1.0)
2
3
4
6 mono-config - Mono runtime file format configuration
7
9 The Mono runtime will load configuration data from the installation
10 prefix /etc/mono/config file, the ~/.mono/config or from the file
11 pointed by the MONO_CONFIG environment variable.
12
13 For each assembly loaded a config file with the name:
14 /path/to/the/assembly.exe.config is loaded as well as the
15 ~/.mono/assemblies/ASSEMBLY/ASSEMBLY.EXT.config file.
16
17 This file controls the behavior of the runtime.
18
19 The file contains an XML-like file with various sections, all of them
20 contained inside a section (It actually uses GMarkup to parse the
21 file).
22
23 This page describes the Unix-specific and Mono-specific extensions to
24 the configuration file; For complete details, see the
25 http://www.mono-project.com/Config web page.
26
28 You use the dllmap directive to map shared libraries referenced by
29 P/Invoke in your assemblies to a different shared library.
30
31 This is typically used to map Windows libraries to Unix library names.
32 The dllmap element takes two attributes:
33
34 dll This should be the same string used in the DllImport attribute
35
36 target This should be the name of the library where the function can be
37 found: this name should be suitable for use with the platform
38 native shared library loading routines (dlopen etc.), so you may
39 want to check the manpages for that, too.
40
42 This directive can be used to map a specific dll/function pair to a
43 different library and also a different function name. It should appear
44 inside a dllmap element with only the dll attribute specified.
45
46 The dllentry element takes 3 attributes:
47
48 dll This is the target library, where the function can be found.
49
50 name This is the name of the fuction as it appears in the metadata:
51 it is the name of the P/Invoke method.
52
53 target This is the name of the function to lookup instead of the name
54 specified in the P/Invoke method.
55
57 Both the dllmap and the dllentry elements allow the following two
58 attributes which make it easy to use a single configuration file and
59 support multiple operating systems and architectures with different
60 mapping requirements:
61
62 os This is the name of the operating system for which the mapping
63 should be applied. Allowed values are: linux, osx, solaris,
64 freebsd, openbsd, netbsd, windows, aix, hpux.
65
66 cpu This is the name of the architecture for which the mapping
67 should be applied. Allowed values are: x86, x86-64, sparc, ppc,
68 s390, s390x, arm, mips, alpha, hppa, ia64.
69
70 The attribute value for both attributes can be a comma-separated list
71 of the allowed values. Additionally, the first character may be a '!'
72 to reverse the meaning. An attribute value of "!windows,osx", for exam‐
73 ple, would mean that the entry is considered on all operating systems,
74 except on Windows and OS X. No spaces are allowed in any part of the
75 value.
76
77 Note that later entries will override the entries defined earlier in
78 the file.
79
81 The following example maps references to the `cygwin1.dll' shared
82 library to the `libc.so.6' file.
83 <configuration>
84 <dllmap dll="cygwin1.dll" target="libc.so.6"/>
85 </configuration>
86
87 This one maps the following C# method:
88 [DllImport ("libc")]
89 static extern void somefunction ();
90 to differentfunction in libdifferent.so , but to the same function in
91 the library libanother.so when running under the Solaris and FreeBSD
92 operating systems.
93 <configuration>
94 <dllmap dll="libc">
95 <dllentry dll="libdifferent.so" name="somefunction" target="differentfunction" />
96 <dllentry os="solaris,freebsd" dll="libanother.so" name="somefunction" target="differentfunction" />
97 </dllmap>
98 </configuration>
99
100
102 mono(1),[22mmonodis(1),mint(1)
103
104
105
106 Mono(Mono 1.0)