Cross Version Serialization Broken between V1.1 and V2.0 [Ryan Byington]

In V2.0 we sometimes needed to add fields to types that existed in V1.1. If this type just has the Serializable attribute applied to it this will break serialization compatibility with V1.1. Currently when 1.1 tries to deserialize an instance with this new field it will throw an exception the runtime formatters do not allow for missing or additional fields.

We fixed this in V2.0 by adding the OptionalFieldAttribute which allows type authors to mark new fields as optional. This attribute would be applied to a field that was added in a newer version of the type. With this backwards and forwards serialization compatibility is maintained.

However V1.1 and even V1.1 SP1 are still currently broken since the strict formatter behavior has not changed. This will likely be fixed in SP2 but until then don’t expect cross version serialization to work.

Some pretty fundamental types are affected by this like CompareInfo and any types like System.Collections.Comparer that have a field of this type. Which means Hashtable is broken as well.