Loading modules targeting different versions of same code base

Topics: Prism v4 - WPF 4
Apr 4, 2012 at 7:44 AM

Hello, 

Consider a scenario where a hosting application is designed load modules built from a common platform. This will work fine as long as all the modules target the same version of the platform (version A) assemblies, however, as the platform evolve and new modules are created targeting the new version (version B) a problem arises. 

When the hosting application loads a module targeting version A of the platform, the referred platform assemblies are loaded into the process. Later, when loading a module targeting version B of the platform, that modules referred assemblies must be loaded and if module A and module B target the same platform type a version could occur. For instance, the class Car's property Model has changed from a string to an enumeration.

Does Prism offer mechanisms to handle a scenario like this or must all modules target the same version of the code base?

Best Regards

/Capital

Developer
Apr 4, 2012 at 8:14 PM
Edited Apr 4, 2012 at 8:15 PM

Hi Capital,

If I understood the scenario you are describing correctly, you are talking about a case when (as an example) you have two or more modules that contains a reference to different versions of a specific assembly. When those modules are loaded, different versions of the assembly will be also loaded and a version conflict error might occur.

Based on my understanding, the aforementioned scenario is not supported in Prism as out of the box, as Prism doesn't seems to provide any mechanism to control the versions of the assemblies used by each module. As far as I know, usually it's expected that all the modules consumed by the application are compatible between each other and the shell application itself, and that the versions of the assemblies they share are the same.

Please, let us know if we have misunderstood the scenario you are describing.

Regards,

Damian Cherubini
http://blogs.southworks.net/dcherubini

Apr 5, 2012 at 9:13 AM

You understood me right Damian, 

Thanks for your input.

Regards

/Capital