views:

25

answers:

2

I'm aware of the limitations of loading an assembly dynamically during run-time that prevents it from being unloaded. Instead it's been suggested that, if this is a requirement, that I should instead load modules in other application domains and then execute code across the domain boundries.

How can I ease this development process and work with this scenario? What tools or frameworks are available?

A: 

Does MEF [1] send you in the right direction? Or you could go with Castle Windsor [2], though I've not had a need to unload with either.

[1] http://code.msdn.microsoft.com/mef

[2] http://www.castleproject.org/container/index.html

adam straughan
MEF is not capable of unloading assemblies, and as far as I can tell neither does Windsor, they're both just general composition frameworks. MAF is the only option i'm familiar with.
Firoso
A: 

It depends on how complicated the interaction is between your "host" app and the dynamically loaded code. If it is fairly complicated then you may want to go the full System.AddIn route. If your interactions are fairly simple then you should probably just write your own classes to handle the loading and unloading of the assemblies. I've done this a number of times for various smaller projects so I can post code if that would be helpful.

Russell McClure
it would be helpful, the interactions would be almost at a hosted scripting level, but it's still native code, long story.
Firoso