Add Explicit Entry Point into Plugins
Right now, there is no option available to have some code executed whenever a plugin is initially loaded. ComponentSettings, static constructors, and even module initializers are not called before for example Plugin Types are retrieved through Reflection. It would be helpful to have the option of some code explicitly called before any other action is taken on a plugin module (assembly), including type initialization, retrieving Bench profiles, last-used Test Plans, etc. which all require the Plugin Types for a particular module. One use of this is if a plugin is dependent on an already-existing program installed, and those assemblies are located elsewhere, it would be very clean to be able to dynamically load these dependencies, instead of either having to manually copy them, ship the OpenTAP plugin with the external program installation, or ship the requisite assemblies with the OpenTAP plugin. However, this dynamic loading would have to occur when the plugin assembly is loaded, even Reflection-only, as the Plugin Types themselves may inherit from and thus be dependent on these dependencies.
The solution to this I would suggest, based on how plugins are already structured, is create a new Interface, which implements IPluginType, such as IPluginInit or IPluginEntry, something like that. The PluginManager would then, upon loading the plugin, first before any other action is taken or Types are searched for, search for classes that implement this Interface and call the constructor. Any code that would be related to plugin initialization would go inside the constructor. The only requirement for when this code is executed is before any other Type is loaded or constructor called from the plugin.