dimanche 7 mai 2017

How to add assemblies reference to a loaded assembly?

I am using .NET reflection in order to inspect the content of an assembly. Unfortunately this is not simple when it comes to inspecting types which are present in my assembly but are not defined there.

So let's say I have two Assembly:

Assembly assembly1 = Assembly.LoadFrom("path-to-assembly1.dll");
Assembly assembly2 = Assembly.LoadFrom("path-to-assembly2.dll");

In assembly1 there are types defined in assembly2 so what I want is basically loading assembly2 into assembly1.

How to achieve this programmatically?





Aucun commentaire:

Enregistrer un commentaire