Bug 57823 - Cannot serialize type 'Xamarin.Forms.Element' (2.3.5.255-pre5)
Summary: Cannot serialize type 'Xamarin.Forms.Element' (2.3.5.255-pre5)
Status: RESOLVED INVALID
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 2.3.5
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-06-28 08:22 UTC by CMartino
Modified: 2017-06-28 10:25 UTC (History)
1 user (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED INVALID

Description CMartino 2017-06-28 08:22:56 UTC
Hi,

Since upgrading to the pre-5 release of 2.3.5.255 to correct the ListView issues on UWP, we are unable to compile for store release using .NET ToolChain. 

The following error is given, the ToolChain is attempting to serialize the internal RealParent type of Xamarin.Forms.Element (has a private set method);


2>C:\Users\<OMITTED>\.nuget\packages\microsoft.net.native.compiler\1.6.2\tools\Microsoft.NetNative.targets(691,5): error : System.NotSupportedException: Cannot deserialize type 'Xamarin.Forms.Element' because it contains property 'RealParent' which has no public setter.
2>C:\Users\<OMITTED>\.nuget\packages\microsoft.net.native.compiler\1.6.2\tools\Microsoft.NetNative.targets(691,5): error :    at System.Xml.Serialization.TypeDesc.CheckSupported()
2>C:\Users\<OMITTED>\.nuget\packages\microsoft.net.native.compiler\1.6.2\tools\Microsoft.NetNative.targets(691,5): error :    at System.Xml.Serialization.TypeDesc.CheckSupported()
2>C:\Users\<OMITTED>\.nuget\packages\microsoft.net.native.compiler\1.6.2\tools\Microsoft.NetNative.targets(691,5): error :    at System.Xml.Serialization.TypeScope.GetTypeDesc(Type type, MemberInfo source, Boolean directReference, Boolean throwOnError)
2>C:\Users\<OMITTED>\.nuget\packages\microsoft.net.native.compiler\1.6.2\tools\Microsoft.NetNative.targets(691,5): error :    at System.Xml.Serialization.ReflectionAwareCodeGen.WriteReflectionInit(TypeScope scope)
2>C:\Users\<OMITTED>\.nuget\packages\microsoft.net.native.compiler\1.6.2\tools\Microsoft.NetNative.targets(691,5): error :    at System.Xml.Serialization.XmlSerializationWriterCodeGen.GenerateBegin()
2>C:\Users\<OMITTED>\.nuget\packages\microsoft.net.native.compiler\1.6.2\tools\Microsoft.NetNative.targets(691,5): error :    at System.Xml.Serialization.TempAssembly.GenerateAssembly(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, Evidence evidence, XmlSerializerCompilerParameters parameters, Hashtable assemblies, String outputDir, IEnumerable`1 referenceDirectories, String intermediateDir, Boolean loadAssembly)
2>C:\Users\<OMITTED>\.nuget\packages\microsoft.net.native.compiler\1.6.2\tools\Microsoft.NetNative.targets(691,5): error :    at System.Xml.Serialization.XmlSerializer.GenerateSerializer(Type[] types, XmlMapping[] mappings, CompilerParameters parameters, String outputDir, IEnumerable`1 referenceDirectories, String intermediateDir, Boolean loadAssembly)
2>C:\Users\<OMITTED>\.nuget\packages\microsoft.net.native.compiler\1.6.2\tools\Microsoft.NetNative.targets(691,5): error :    at System.Xml.Serialization.XmlSerializer.GenerateSerializer(Type[] types, String outputDir, IEnumerable`1 referenceDirectories, String intermediateDir, List`1 wcfSerializers, Boolean loadAssembly)
2>C:\Users\<OMITTED>\.nuget\packages\microsoft.net.native.compiler\1.6.2\tools\Microsoft.NetNative.targets(691,5): error :    at SerializationAssemblyGenerator.Program.Main(String[] args)
2>C:\Users\<OMITTED>\.nuget\packages\microsoft.net.native.compiler\1.6.2\tools\Microsoft.NetNative.targets(691,5): error : ILT0032: Failed to compile serialization code. See the build log for error details.