Creating plugins in C#: How does it work? (Part 1/4)

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 plugin scheme
Basic plugin scheme

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!

Continue to the next part of this tutorial…

Leave a Reply

Your email address will not be published.

 

This site uses Akismet to reduce spam. Learn how your comment data is processed.