If I have a class named "MyClass" in an assembly named "AssemblyA" and serialize it to a file using .NET's BinaryFormatter. Then move the code of "MyClass" into an assembly named "AssemblyB" and try to deserialize the file I get the following "System.TypeLoadException" exception:
Could not load type 'AssemblyA.MyClass' from assembly 'AssemblyA, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
Is there any way for me to indicate that the class has been moved to AssemblyB? Via an attribute of some sort? Or is it possible to modify the serialised file as a pre-preprocessing step to change all references from AssemblyA.MyClass to AssemblyB.MyClass? Finally, if neither of those options are possible, is it possible to bypass trying to deserialise this class and continue deserialising the rest of the data anyway?