Assembly.Load in WPF -> headaches
For experienced programmers I'm sure this post will not bring anything new but I'm sure that many people came across this problem.
Scenario:
Have a WPF application in location A and the same one in location B. Start application from location A and try to get the information from the application in location B using Assembly.Load(path). I needed to do this for the updater module to check it's version, name etc. In the next second application A will crash because it can't find various resources because of the same namespaces allocation.
Solution:
Use Assembly.ReflectionOnlyLoadFrom(path) or you can use different domains for loading the second assembly. The first solution is better if you just need few reflection informations from that assembly. Of course if you intend to use that 2nd assembly you need to load it in a different domain: http://msdn.microsoft.com/en-us/library/25y1ya39.aspx







