We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Removing version information when serializing a Diagram that contains custom Symbol with SaveBinary

I have a diagram with some custom symbol 

    [Serializable()] public class CustomNode : Group { protected CustomNode(SerializationInfo info, StreamingContext context) : base(info, context) { this.m_nodeInformation = info.GetString("strDescription"); } protected override void GetObjectData(SerializationInfo info, StreamingContext context) { base.GetObjectData(info, context); info.AddValue("strDescription", this.NodeInformation); } }
Then i serialize the entire diagram with:

 diagram1.SaveBinary(this.FileName);

and later load with:

diagram1.LoadBinary(this.FileName);



The probleim is that this serialization contains the version of the assembly of my class, and when it changes old node won't be deserialized.

There is a method to customize this?


best regards
Marco


1 Reply

NG Naganathan Ganesh Babu Syncfusion Team September 29, 2016 11:35 AM UTC

Hi Macro, 
Thanks for contacting Syncfusion support. 
On further analysis, we found that the problem is due to the AssemblyResolver error. Please refer to the below online KB documentation link for your references. 
https://www.syncfusion.com/kb/5703/Adding-OldToNewDeserializationBinder-for-loading-old-versioned-edp-file-in-new-version 
Regards, 
Naganathan K G  


Loader.
Live Chat Icon For mobile
Up arrow icon