I need to serialize some object graphs to disc
What difficulties am I likely to encounter if I make changes to a class, then try to deserialize an old version?
Do some serializers handle this better than others?
What is the standard way of handling such a scenario?
For example, in a new version of the code, do I need to retain all the old classes so that when deserializing an old file i can do so to the old class, then migrate the data to the new class? Will changing the class’ name/namespace break deserialization?
Thanks for any advice
Well, as I remember, the problems starts after:
You can have custom serialization to handle versioning problems on you own.
But I would recommend to use
DataContractSerializeralong with Best Practices: Data Contract Versioning for the most common cases.