Multiple AppDomain's and dll's RRS feed

  • Question

  • Hello,

    I hope anyone can help me. I need to create an application with such kind of a plugin system. It is important that I can change or update the Plugins without having the appplication to close, so I have only a "partial downtime" if you want to call it so (just the plugin features are not available for a moment).

    I started to play around the first time with AppDomains, because I have read this would be the only way to do this. (?)

    Finally I got it working in a test application and 2 .dll's. But the result is not the same I expected. Please see the screenshot below (my comments / questions are in red color)

    (click the image to enlarge)

    Download source of the Application and the dll's (Zipped, 33kb, VB.Net 2008)

    In advance, thanks for your help :)

    Monday, January 17, 2011 1:52 AM

All replies

  • Ok, one thing I figured out after several reading and try-and-error. I have to use Domain.CreateInstanceFromAndUnwrap instead loading the assembly first. Well, ok.

    Now each dll is loaded in its own domain, and the default domain does not contain them. At this point anything is fine.

    But: If I unload the domains, the dll assemblies gets transferred (or reloaded) into the default domain. But why? And how can I change this?

    Monday, January 17, 2011 11:39 AM