I read this aricle How to load plugins in .NET?, and I really don't see the brilliance of Microsoft's System.Addin namespace. Why can't I just have a plugins folder in my bin directory that users can put an assembly into that implements an interface I design? I could then just use reflection to create an instance of the plugin class and reference it with my interface.
Why is the System.Addin way apparently so much better? Especially since it seems like three times the work and a less intuitive design.
NET Plugins. This project provides API for loading . NET assemblies dynamically, executing them as extensions to the main application, and finding and isolating the dependencies of the plugin from the main application. It allows fine-grained control over assembly isolation and type sharing.
Registering a Plugin in Dynamics 365Download the Plugin registration tool using NuGet or PowerShell, then open it by clicking PluginRegistration.exe. Connect to your instance by selecting Create new Connection. Make sure you have office 365 selected. Enter your Microsoft Account credentials, then click Login.
In today's article, we will take a look at using the plugin pattern in C#. The plugin pattern allows us to drop assemblies into a particular location and use their implementation in our applications. This is one way we can create loosely coupled applications.
I would recommend looking at the Managed Extensibility Framework (which was added to the core framework in .NET 4). It allows you to do exactly what you're describing, and is very simple and flexible to use in extensibility scenarios.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With