jeudi 13 avril 2017

How to load/unload assembly?

I'm working on a C# solution, and I need to compile a project in the solution, load its assemblies and explore its types.

My problem is, once I load the assembly, I can't unload it, so I'm forced to close VS and reopen it if I want to recompile the project whose assembly I'm exploring. I've read that loading the assembly in a different AppDomain can solve my problem, but with that I lose the LoadFrom method and I'm interested in automatically loading dependencies.

So, my question is: how can I load an assembly with its dependencies, explore its types and then unload it?





Aucun commentaire:

Enregistrer un commentaire