[Mono-dev] Embedding mono and reducing the number of etc/lib required files

romain lelong lelongro at yahoo.fr
Sat Aug 22 17:31:03 EDT 2009

Hello everyone,

I've managed to embed Mono in a c++ program without trouble (under MS Windows) but I would like to optimize this a little...

As I want to do a "standalone application", I used the "mono_set_dirs()" function and copied the whole of "lib" and "etc" directories from the mono installation dir into my own directory, so my program is totally independent from mono "program files" dir.

But the lib & etc directories are quite huge, and contains lots of small files....

 - Is there a "guideline" allowing to know which files are needed and which one I can discard in my directories ? Do I just have to manually identify the references my assembly have and delete every other file ?

 - Is it possible to "fuse" all these "lib & etc" files directly inside the .EXE file or into one big external "resources" file ? I would like to hide all these small files and limit the risk for an user to damage or hijack my program by removing/replacing the libraries in these directories...

Perhaps there is even simplier ways... How could I have as little files as possible in my program folder ?

Thanks in advance,


More information about the Mono-devel-list mailing list