How can I load two versions of same assemblies into two different domains from two different subfolders?

后端 未结 2 388
旧时难觅i
旧时难觅i 2021-01-14 12:32

I\'m trying to build a small tool for comparing types in a bunch of assemblies. For this purpose I created two subfolders and put the respective dlls there:

相关标签:
2条回答
  • 2021-01-14 12:37

    If you don't want to recompile the assemblies with a different strong name, than you can load them into different AppDomains, with different setup configuration, and different .config files, exactly like IIS does with multiple web sites, each one in its one AppDomain, completely independent, all hosted in only one AppPool process - w3wp.exe.

    0 讨论(0)
  • 2021-01-14 12:48

    Strong name your dll . Make 2 exe to run separate app domain.

    Otherwise there is no way to reference same dll name twice. You have to rename new dll with _new.dll and then you can use it with fully qualified names pace class method name format.

    Meaning rename all v2 dll

    0 讨论(0)
提交回复
热议问题