Hello everyone,
I’ve learned a fancy new thing in C#:
Working with plugins
So today I’m going to explain how the basics work, what you need in order to have your application work with plugins.
Let’s get started shall we? 🙂
How does it work?
If you work with plugins, the basic scheme of your solution will look like this:
The main idea is that you have a layer between your application and your plugin that allows your application to load the plugin.
That is what the handler is for.
Both the application and plugin will have a reference to the DLL containing the handler, allowing the application to check if the plugin is a valid plugin and if it is, load it.
This will become more clear later on in the tutorial.
The solution
Start with creating a new blank solution (Other project types > Visual Studio Solutions > Blank Solution) and name it TestPlugin
Throughout this entire tutorial we’ll be working from within the same solution!