Serializing objects.
-
I have serialized an object from a project(lets name it x). When i deserialize it from the same project,i am able to recover my object.However, when i try to deserilize that object when i am working in another project, i get an exception " Assembly or file X missing " ?? Could someone tell me why?? Thanks.
-
I have serialized an object from a project(lets name it x). When i deserialize it from the same project,i am able to recover my object.However, when i try to deserilize that object when i am working in another project, i get an exception " Assembly or file X missing " ?? Could someone tell me why?? Thanks.
when you serialize an object some information about the object is also saved. This includes the assembly to which the class belongs, the version, culture, the namespace etc. This information is required to recreate the class. In your case the serializing is done in one assembly & deserializing in another assembly. The type information doesnt match. One work around is to keep the class you want to serialize in a common assembly. and reference this asssembly in your other projects. HTH Rak
-
when you serialize an object some information about the object is also saved. This includes the assembly to which the class belongs, the version, culture, the namespace etc. This information is required to recreate the class. In your case the serializing is done in one assembly & deserializing in another assembly. The type information doesnt match. One work around is to keep the class you want to serialize in a common assembly. and reference this asssembly in your other projects. HTH Rak