M
Mike
I'm having a problem with serializing between different versions of classes.
I've read the many posts on handling versioning by implementing
ISerializable but unforunately we shipped the first few versions of our app
thinking we had done that, but unforunately we hadn't. Thus all the
original serialized object were done using pretty much standard .NET binary
serialization.
We're using the binary formatter and now have a number of typed collections
that were serialized using the original format and now a number using the
newer format based on ISerializable. We can't just ignore the old versions
and need some way to convert them. I tried following the articles the
talked about the SerializationBinder under the assumption that I could at
runtime decide which version of an assembly (old or new) should handle the
deserizliation but it seemed to ignore anything I did and still failed.
So some questions;
1) If I ship the old version of the assembly that created the serialized
object, Acme.App.Legacy.dll and the new Acme.app.dl can I at deserialization
time decide which version of the assemby should handle the deserialization?
If so, what about other assemblies that are reference by those assemblies?
2) Is the serialization binder supposed to support what I'm trying to do?
3) If I can't do that does anyone have any suggestions on how to convert
those old serialized objects?
Thanks,
Mike
I've read the many posts on handling versioning by implementing
ISerializable but unforunately we shipped the first few versions of our app
thinking we had done that, but unforunately we hadn't. Thus all the
original serialized object were done using pretty much standard .NET binary
serialization.
We're using the binary formatter and now have a number of typed collections
that were serialized using the original format and now a number using the
newer format based on ISerializable. We can't just ignore the old versions
and need some way to convert them. I tried following the articles the
talked about the SerializationBinder under the assumption that I could at
runtime decide which version of an assembly (old or new) should handle the
deserizliation but it seemed to ignore anything I did and still failed.
So some questions;
1) If I ship the old version of the assembly that created the serialized
object, Acme.App.Legacy.dll and the new Acme.app.dl can I at deserialization
time decide which version of the assemby should handle the deserialization?
If so, what about other assemblies that are reference by those assemblies?
2) Is the serialization binder supposed to support what I'm trying to do?
3) If I can't do that does anyone have any suggestions on how to convert
those old serialized objects?
Thanks,
Mike