How can I develop applications in C# that can be further extended using DLL add-ins?
Like .NET Reflector can browse and load DLLs at runtime.
I searched for tutorials but I couldn’t find anything. Maybe I wasn’t searching using the right keywords.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Basically in very brief and high-level terms, what you need to do is define one or more interfaces that your application will use to interact with the extension. Then individuals that want to write an extension for your application will implement your predefined interfaces and then register the implementation with your application. Registration could be as simple as dropping the extension DLL in a directory and your application will enumerate the directory load the extension dlls and start interacting with the classes that implement you expectd interfaces.
Take a look at for following methods for a starting point on dynamically loading assemblies and creating instances of classes at runtime
Of course there is much more to it, but this should give you a starting point.