Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Loading different versions of the same assembly

Tags:

Using reflection, I need to load 2 different versions of the same assembly. Can I load the 2 versions in 2 different AppDomains in the same process?

I need to do some data migration from the old version of the app to the new version. Please let me know if this is possible or should I use 2 separate processes.

like image 799
Gulzar Nazim Avatar asked Sep 12 '08 00:09

Gulzar Nazim


People also ask

Can multiple versions of the assembly can live side by side?

Because the strong-named assembly's version number is part of its identity, the runtime can store multiple versions of the same assembly in the global assembly cache and load those assemblies at run time.

What is the phenomenon of side by side execution?

Side-by-side execution is the ability to run multiple versions of an application or component on the same computer. You can have multiple versions of the common language runtime, and multiple versions of applications and components that use a version of the runtime, on the same computer at the same time.

Is assemblies can only be dynamic?

Assemblies can be static or dynamic. Static assemblies are stored on disk in portable executable (PE) files. Static assemblies can include interfaces, classes, and resources like bitmaps, JPEG files, and other resource files.


1 Answers

If you are doing it at design time (which you indicate you are not) this should help you:

http://blogs.msdn.com/abhinaba/archive/2005/11/30/498278.aspx

If you are doing it dynamically through reflection (looks like the case here) this might help you:

https://www.infosysblogs.com/microsoft/2007/04/loading_multiple_versions_of_s.html

like image 135
GEOCHET Avatar answered Oct 18 '22 11:10

GEOCHET