...these plugin DLLs must access NameSpaces A B C D
The plugins have a reference to the main exe
Maybe there is missing information, or I am lacking sleep, but this sure seems like a strange "plugin model." Unfortunately, without knowing more, probably alot more, I don't know how to help your current situation.
That said, I would highly recommend considering re-architecting your plugins. Either:
- Make them part of the actual project or;
- Convert them to a more traditional plugin model.
If you go with Door #2, this Application Block article covers what I would consider a traditional plugin model and would probably make your life much easier if you adopted it.
Edit: I just realized my answer was probably too brief and didn't explain what I meant by "traditional plugin model".
Plugins shouldn't be referencing your application directly, nor should it require a rebuild or redeployment to use them. Typically you would define an interface in one project (sometimes referred to as a Separated Interface), but implement it separately. In other words, the plugin can know about the core library that contains the interface, but not have to know about the main executable that uses it.
So in practice, you define an interface in your core library that defines the methods that the application requires from the plugin. You then code your main application against that interface. Then during the runtime initialization of your main application, you can load the assemblies that contain the plugin classes and instantiate the plugin, or even initialize it to a test class during development. There are many examples out there on how to do this, and there are a few questions on SO about this as well.