.NET Plugin DLL Hell (aka assembly binding nightmares)
I’ve worked on a few .NET WinForms applications that utilized a “plugin” model. You’ve probably seen similar apps out there, where a main application searches a directory for DLLs, and then tries to load them into the AppDomain, using some code like below:
1 |
Assembly plugin = System.Reflection.Assembly.LoadFrom(pluginFileName); |
1 |
<span style="color: #0000ff">object</span> pluginClass = Activator.CreateInstance(plugin.GetType(<span style="color: #006080">"Plugin.PluginClass"</span>)); |
1 |
  |
This kind of architecture is pretty standard, and is…