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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Native chain - root serialization type

Thread ID:





127213 Nov 3,2016 05:17 AM UTC Sep 18,2017 12:17 PM UTC UWP 4
Tags: SfDiagram
Charl Minnaar
Asked On November 3, 2016 05:17 AM UTC


I cannot Run my UWP app in release mode with  ".NET Native tool chain" enabled 

It fails on the Load function :
        Stream str = readStream.AsStream();

Exception thrown: 'System.Runtime.Serialization.InvalidDataContractException' in System.Private.DataContractSerialization.dll
An exception of type 'System.Runtime.Serialization.InvalidDataContractException' occurred in System.Private.DataContractSerialization.dll but was not handled in user code
Additional information: Type 'Syncfusion.UI.Xaml.Diagram.DiagramElementViewModel' cannot be serialized, serialization code for the type is missing. Consult the SDK documentation for adding it as a root serialization type.

Visual Studio Enterprise 2015 Update 3

Attachment: UWP_error_d56df799.zip

Charl Minnaar
Replied On November 3, 2016 10:56 AM UTC

I managed to solved this issue with reflection

Keerthivasan Ramamoorthy [Syncfusion]
Replied On November 4, 2016 10:11 AM UTC

Hi Charl, 
We are glad that you have fixed your issue. Please let us know if you need any other assistance. 
Keerthivasan R. 

Andreas Ermer
Replied On September 15, 2017 03:15 PM UTC

Hi Charl Minnaar, could you please share how you solved your issue?

Ranjitha Amirthalingam [Syncfusion]
Replied On September 18, 2017 12:17 PM UTC

Hi Andreas, 
The reported issue can be resolved by assigning the position as zero to the Stream before Loading. We have provided code example to represent this. Please refer to the code example as below. 
Code Example: 
System.IO.MemoryStream str = new System.IO.MemoryStream(); 
str.Position = 0; 
//Here,diagram is the instance of SfDiagram. 

We hope that , Charl also resolved the issue as we described above. 
Ranjitha A. 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon