mercredi 31 mai 2017

resolve Type in different assembly when it cannot be found

I have several assemblies used as plugins. They were compiled against an assembly -- Common.dll -- that contained shared code across all the plugins. Recently this Common.dll has been split into Common.A.dll and Common.B.dll, and so Common.dll no longer exists.

When loading a plugin, Common.dll can be resolved to to something else (e.g., Common.A.dll) via the AppDomain.AssemblyResolve event. But when calling methods in the plugin that require something from Common.B.dll those types cannot be found.

I'd like to specify the assembly for these types that are not found. Is this possible? AppDomain.TypeResolve seems only to work for dynamic assemblies.





Aucun commentaire:

Enregistrer un commentaire