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.
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.
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.
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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With