Plugin Architecture
Load plugins in .NET without the ceremony
Define an interface. Drop DLLs in a folder. Get every implementation back.
What Does it Do?
Winterborn.Library.PluginArchitecture finds and instantiates every type that implements an interface you define, across as many assemblies as you like. Point it at a folder, a single .dll, or assemblies you already have loaded, and it hands back the types or ready-made instances. It also ships a minimal factory for mapping interfaces to concrete types in code instead of config, so refactoring tools and the compiler keep the wiring honest. No attributes to decorate, no manifest files, no framework to adopt, and no dependencies — the package pulls in nothing but the BCL.
Code sample
// Discover every implementation of your interface
var plugins = Plugins.Load(@"C:\MyApp\plugins");
var exporters = plugins.GetInstances<IExporter>();
// Or map interfaces to implementations in code
var factory = new Factory();
factory.SetImplementation<IExporter, CsvExporter>();
var exporter = factory.Make<IExporter>();
What you get
Discovery by interface, not by attribute. Plugin authors implement your interface and nothing else — their project never references this library.
Load from wherever. A directory path, a single .dll path, a DirectoryInfo, or Assembly instances you already hold.
Fails soft. A corrupt or unmanaged DLL sitting in the folder gets skipped, not thrown.
Cached lookups. Resolved type lists are memoised per instance; call ClearCache() when you want a re-scan.
Zero dependencies. Nothing to audit, nothing to conflict with your versions.
Requirements and limits
Worth knowing before you dotnet add package:
- .NET 10. No netstandard or down-level target.
- Plugin types need a public parameterless constructor. That is the trade for the simplicity — there is no dependency injection or constructor injection.
- No isolation. Assemblies load into the default context, so there is no unloading and no hot reload, and loading a plugin runs third-party code at full trust. Load only DLLs you trust.
- Scans one directory level, and the types aren't thread-safe. Build your Plugins and Factory at start-up and pass the result around.
Free to use
MIT licensed and free, commercial use included. No tiers, no seat count, no key to register.
dotnet add package Winterborn.Library.PluginArchitecture
Need more?
Support, integration help, and custom features are available from Winterborn.
Email sales@winterborn.com.