We have an application which uses xml serialization for serializing and deserializing its configuration settings.
We are going to release a new version of this application which has some drastic changes in its object model. Our users are not ready to reconfigure the settings with newer version. We need a solution that transforms the xml of previous version to newer version compatible xml. The newer version has some classes removed, renamed, properties added etc.
What is the best way to transform the older xml so that it can be deserialized by the newer version?
When you first load the xml, you have to identify what version it is. The easiest is probably to make a function that transforms the old config into the new format. Then the new format loader can be used all the time and you can get rid of the old one and the old object model.
The transformation could be done either using xslt or with c# code.