I have two versions of the same strong-named assembly (i.e. v1 and v2) which
have a WPF user control in them. When I load v1 in my application, the
control loads and displays fine. When I load v2, I get exceptions since the
v1 assembly is used instead of v2 even though v1 and v2 have been loaded in
my process.
After inspection, I found that it is
System.Windows.Markup.ReflectionHelper.LoadAssemblyHelper which causes the
problem since it caches the assembly name and not the strong name! Hence, if
I clear the _loadedAssembliesHash before instantiating my user control
everything works; I can load v1 and v2 of my user controls in the same
process/appdomain.
What kind of hack code is inside ReflectionHelper.LoadAssemblyHelper? Have
you forgotten how to be side-by-side?
Thanks,
Martin