Apr 2, 2014 at 10:30 PM
Edited Apr 2, 2014 at 10:31 PM
We currently use MEF like this:
That is, we keep assemblies imported by the font end separate from those imported by the back end. This way, Server.exe doesn't need to know about ClientOnlyStuff.dll, and Client.exe doesn't need to know about ServerOnlyStuff.dll. It keeps out unnecessary dependency.
I'd like to do this instead:
- MEF.Extension1.dll <-- Same DLL
- MEF.Extension1.dll <-- Different Context
If I set this up, composition chokes (ReflectionTypeLoadException). On Machine A this is because MEF.Extension1.dll references ClientOnlyStuff.dll, which is not there. On Machine B it chokes because MEF.Extension1.dll references ServerOnlyStuff.dll, which is
I would like to be able to compose only the parts whose dependencies are present. This way a single dll could provide context-appropriate functionality in a number of locations.
One way to do this would be to allow developers to specify which namespace, within the target assembly, they're after.
Is there anything like what I'm talking about that I've missed, or is this a feature request?
Thanks for taking the time to read this, and thanks in advance for any advice you have for me.