I have a windows service which runs like a scheduler, it extends an interface which can be implemented by other classes to become plugin to this service. All plug-ins (eg Plugin1, Plugin2...) would be dropped in sub folder of PlugIn such as PlugIn\Plugin1, PlugIn\Plugin2 respectively. At runtime each of the subfolders (Plugin1, Plugin2) would be searched for any assembly implementing the interface and a timer would be scheduled with the corresponding dlls method.
Now in case Plugin1 & Plugin2 share a common.dll (private assembly) the scheduler loads it only once (whichever occured first). If for some business reasons we update common.dll for Plugin1 and copy it in Plugin1 folder, keeping Plugin2 with previous version, which becomes a problem because now common.dll would be loaded non deterministicaly.
Is there a way I could tie the set of binaries (from the respective folder) with the timer at the time of scheduling or later?