vendredi 28 octobre 2016

Force AssemblyResolve

I set my AppDomain.CurrentDomain.AssemblyResolve handler but this event doesn't fire if the assembly that was intended to be loaded exists in the current directory. This is expected.

I am aware that if I remove the assembly from the current directory my event will be fired - expected as well. But I don't want to remove the file. How can I programmatically force this event to be fired without touching the existing assembly file?

Or, in other words: how can I load the assembly that I want without deleting the existing other assembly file, without installing stuff in the gac and without adding an XML file with redirection? (but if something like that can be done programmatically that's ok)





Aucun commentaire:

Enregistrer un commentaire