It sounds strange but this is exactly what I want because I am using a data structure named "Project" which gets serialized to a save file. I would like to be able to de-serialize an older version of a save file with deprecated fields in tact, but then re-serialize it using only the currently used fields. The problem is that I want to get rid of those deprecated fields when re-serializing the structure in order to minimize file size. Is it possible to mark a field as "de-serializable only"?
Edit:
Thanks for the ideas! I decided to build mostly off of NickLarsen's suggestions and create an old version of the project structure with all depreciated fields in a separate namespace. The difference is that I decided to perform the upgrade upon deserialization. This is great because I can do it all in one line (hopefully you can get the gist what I'm doing here):
Project myProject = new Project((Depreciated.Project)myFormatter.Deserialize(myStream));
The constructor simply returns a new instance of the fresh minimal data structure based on the old bloated one.
Second Edit:
I decided to follow the advice of bebop instead and create new classes for each project version with the oldest version including all depreciated and new fields. Then the constructor of each project upgrades to the next version getting rid of depreciated fields along the way. Here is an illustrative example of converting from version 1.0.0 -> 1.0.5 -> current.
Project myProject = new Project(new Project105((Project100)myFormatter.Deserialize(myStream)));
One key to this is to forced the deserialized file as well as any fields into the older versions of the classes by using a SerializationBinder.