OK, as I promised, some links to my past answers:
Create WPF Application that uses Reloadable Plugins...[
^],
AppDomain refuses to load an assembly[
^],
code generating using CodeDom[
^],
C# Reflection InvokeMember on existing instance[
^],
Projects and DLL's: How to keep them managable?[
^],
Gathering types from assemblies by it's string representation[
^].
Sorry that the application fields mentioned above did not imply WCF (but might include it). I answered in so great detail to some of the questions referenced above mostly because the applications were much more certain than in your case.
Right now, I can add just a couple of considerations.
The most difficult technical issue with the plug-in architectures appears when you need to unload a plug-in. In some applications, it is never needed, so it makes things way simpler. Most likely, you will need it in your field, but I cannot be sure.
This is because unloading of an assembly is not allowed in .NET, by pretty obvious safety reasons. If you need to actually change some plug-ins during run time, you can only load a plug-in assembly in a separate Application Domain and later unload the whole domain. As the address spaces of different domains are perfectly isolated, it involved no danger of invocation of anything already unloaded. This is resolution is at the same time a difficulty, because the Application Domain can only communication via IPC (is that clear?). Fortunately, the
AppDomain
class provides highly simplified IPC facilities convenient and pretty easy for Application Domain communications.
And here is some
good news related to WCF:
WCF is already the IPC. It means that in proper architecture, you can introduce plug-in assembly and develop the mechanism of its use without adding additional complexity related to domain communications: they will communicate via WCF channels anyway. The same states for "classical" .NET remoting. (Some claim that "classical" .NET remoting should be considered obsolete, but I cannot agree with that, because it can provide better flexibility in more difficult scenarios than the typical ones.)
Does it make any sense for your? If you are getting to some ideas, your further questions are quite welcome.
—SA