A Programmer's Dream

Plugin Architecture for .NET

Posted by Stephen Wrighton on 20 Jan 2007

I've used this architecture for building a plug-in system for .Net 1.1 in the past. I liked it, it stored the information about the various DLL's in the application configuration file. Using reflection and a custom configurationHandler one is able to load in the classes at run time.

Of course, I'm building an application using .Net 2.0 and have run into a system where a pluggable architecture makes sense and would be very useful. Well one of the improvements of .Net 2.0 over 1.1 is the modification of how information is stored and accessed in the configuration file.

Oh, the annoyances.

Well after a bit of searching, I found this article on dynamically searching for a plug-in. Basically, it's looking in the application path for any DLL's which have a class that implements the interface that someone is looking for. While, I like the thought of having the information about the classes in a configuration file which I can instantiate using the System.Reflection. But in a pinch, this will work as well.

Tweet me @kidananubix if you like this post.

Tweet