J
Joe
I'm getting an error when deserializing my objects:
"The ObjectManager found an invalid number of fixups. This usually indicates
a problem in the Formatter."
I added a new object to a class that gets serialized and put the
OptionalField attribute on that object. When trying to deserialize my object
in an older version of our application that doesn't have this new class I
get the above error but that's only when items have been added to the class.
The class looks like this:
public class MyCollection : BindingList<MyClass>
{
}
public class MyClass
{
private string mystring;
private CustomEnum myenum1;
private CustomEnum2 myenum2;
}
public class ClassThatGetsSerialized
{
string member1;
int member2;
...
...
[OptionalField]
MyCollection mycollection;
....
}
The error only occurs if object ClassThatGetsSerialized is deserialized by
an older version that doesn't have the definition for MyCollection and if
the member of ClassThatGetsSerialized.mycollection has items in it. If there
are no items then the error does not happen.
We use the OptionalField attribute in many places and it always works fine.
Any ideas?
Thanks,
Joe
"The ObjectManager found an invalid number of fixups. This usually indicates
a problem in the Formatter."
I added a new object to a class that gets serialized and put the
OptionalField attribute on that object. When trying to deserialize my object
in an older version of our application that doesn't have this new class I
get the above error but that's only when items have been added to the class.
The class looks like this:
public class MyCollection : BindingList<MyClass>
{
}
public class MyClass
{
private string mystring;
private CustomEnum myenum1;
private CustomEnum2 myenum2;
}
public class ClassThatGetsSerialized
{
string member1;
int member2;
...
...
[OptionalField]
MyCollection mycollection;
....
}
The error only occurs if object ClassThatGetsSerialized is deserialized by
an older version that doesn't have the definition for MyCollection and if
the member of ClassThatGetsSerialized.mycollection has items in it. If there
are no items then the error does not happen.
We use the OptionalField attribute in many places and it always works fine.
Any ideas?
Thanks,
Joe