Coffeehouse Post

Single Post Permalink

View Thread: .Net versioning question
  • User profile image

    I had a different project where I had the "same" class defined in two different projects in different namespaces. When I serialized the class in project A, I got a serialization exception when deserializing in project B (as expected). However by subscribing to AppDomain.AssemblyResolve, I was able to simply pass in the currently executing assembly and the class successfully deserialized even though it was in a different namespace.

    I wonder if I can take advantage of that in some way by passing in the correct DLL version in OnAssemblyResolve, but it would require me to "unregister" the class again when switching servers so that I get asked again where to locate the class.