2010-04-16 Sebastien Pouliot <sebastien@ximian.com>
[mono/afaerber.git] / docs / assembly-bundle
blob3e64e147cb140ae1190bfc28ac7a5b679baa6e4b
2            HOWTO bundle assemblies inside the mono runtime.
3                    Paolo Molaro (lupus@ximian.com)
5 * Intent
7         Bundling assemblies inside the mono runtime may be useful for a number
8         of reasons:
10                 * creating a standalone complete runtime that can be more easily
11                 distributed
13                 * having an application run against a known set of assemblies
14                 that has been tested
15         
16         Of course, there are drawbacks, too: if there has been fixes
17         to the assemblies, replacing them means recompiling the
18         runtime as well and if there are other mono apps, unless they
19         use the same mono binary, there will be less opportunities for
20         the operating system to optimize memory usage. So use this
21         feature only when really needed.
23 * Creating the Bundle
24         
25         To bundle a set of assemblies, you need to create a file that
26         lists the assembly names and the relative files. Empty lines
27         and lines starting with # are ignored:
28         
29         == cut cut ==
30         # Sample bundle template
31         mscorlib: /path/to/mscorlib/assembly.dll
32         myapp: /path/to/myapp.exe
33         == cut cut ==
34         
35         Next you need to build the mono runtime using a special configure option:
37                 ./configure --with-bundle=/path/to/bundle/template
39         The path to the template should be an absolute path.
41         The script metadata/make-bundle.pl will take the specifie
42         assemblies and embed them inside the runtime where the loading
43         routines can find them before searching for them on disk.
45 * Open Issues
47         There are still two issues to solve:
49                 * config files: sometimes they are needed but they are
50                   not yet bundled inside the library ()
52                 * building with the included libgc makes it not
53                   possible to build a mono binary statically linked to
54                   libmono: this needs to be fixed to make bundles
55                   really useful.
57