I would like to implement a Plug-In framework for a C# application; such that the application doesn’t need to know of all of the available .DLL’s at time of compilation but can then be dynamically linked at run time. I expect that I will need to setup some expected parameters to pass information in and out of Plug-In’s but I’m not really sure of what else is needed or how to go about this in C#. Could you point me to a pattern for this implementation or a framework that I can implement to achieve this (if API’s - Open Source license required)?
How to construct a C# plug-in framework?
Asked Answered
The Managed Extensibility Framework (MEF) is definitely something you want to take a look at. It's developed by Microsoft, and the stable release version is included in .NET 4.0 and later.
You should have a look at Mono.Addins library. It's open source, easy to use, and really powerful (I think it's even used by MonoDevelop itself).
© 2022 - 2024 — McMap. All rights reserved.