[Mono-dev] reloading mono domain or assemblies

marcus julius marcusjls at yahoo.com
Fri Aug 13 09:10:38 EDT 2010


Hi,

We are developing a game and using C# and C++ with the help of mono. 

There are two dlls we use; Dll1 and Dll2. At run-time, I want to change (update) these dlls without restarting the game (which takes a while). Here is the code we use:

mono_domain = mono_jit_init(Dll1);

mono_world_assembly = mono_domain_assembly_open(mono_domain,Dll1);
mono_world_image = mono_assembly_get_image(mono_world_assembly);
       
mono_module_assembly = mono_domain_assembly_open(mono_domain, Dll2);
mono_module_image = mono_assembly_get_image(mono_module_assembly);

I tried two diferent ways, but neither was successful. I don't even know what is the exact error since I don't know how to debug mono in C++.

First approach was to use mono_jit_cleanup and then when the dlls are recompiled use the code above to reload the dlls.

Second approach was to close the assemblies and images and reopen them when the dlls are replaced.

Did I make a mistake and/or is there a way to do this? 

Thanks.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20100813/e928e44d/attachment.html 


More information about the Mono-devel-list mailing list