serialization of objects and assembly version

  • Thread starter Thread starter Smokey Grindel
  • Start date Start date
S

Smokey Grindel

I have a signed assembly which has say version 1.0.0.0 it has serializable
objects in it, say I serialize an object to a database... ok the object
stores the schema for version 1.0.0.0... now we are at version 1.5.0.0 and
the object's schema has not changed, and I can gurantee this... but when you
try to deserialize the 1.0.0.0 object it says "Parse Error, no assembly
associated with Xml key" because the versions do not match... how do I get
the version 1.5.0.0 to deserialize version 1.0.0.0 objects when I can
gurantee they have not changed in schema.. thanks!
 
Smokey Grindel said:
I have a signed assembly which has say version 1.0.0.0 it has serializable
objects in it, say I serialize an object to a database... ok the object
stores the schema for version 1.0.0.0... now we are at version 1.5.0.0 and
the object's schema has not changed, and I can gurantee this... but when
you try to deserialize the 1.0.0.0 object it says "Parse Error, no assembly
associated with Xml key" because the versions do not match...

I am not sure about XML serialization, but .NET 2.0 introduced version
Version Tolerant Serialization (VTS) for both binary and SOAP formatting.

Advanced Serialization: Format Your Way to Success with the .NET Framework
Versions 1.1 and 2.0
<URL:http://msdn2.microsoft.com/de-de/magazine/cc163902(en-us).aspx>

Version Tolerant Serialization
<URL:http://msdn2.microsoft.com/en-us/library/ms229752.aspx>
 
I can't seem to get SOAP objects that are made with the soapformater and
serialized to xml to work in a VTS scenerio... always throws an error saying
wrong version... (this is .NET 2.0 SP1 here)
 
Back
Top