Bug 54675 - Problem Deserializing XML File in Release Mode.
Summary: Problem Deserializing XML File in Release Mode.
Alias: None
Product: Android
Classification: Xamarin
Component: Linker ()
Version: 7.3 (15.2)
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Radek Doulik
Depends on:
Reported: 2017-04-06 21:14 UTC by Jim Wilcox
Modified: 2017-06-26 14:45 UTC (History)
3 users (show)

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

Sample Project (25.45 KB, application/x-zip-compressed)
2017-06-26 14:45 UTC, John Miller [MSFT]

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 for Bug 54675 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:

Description Jim Wilcox 2017-04-06 21:14:03 UTC
I have an Android App that uses an XML file to hold the format settings for a report.  When you run it with Linking set to None, it works fine.  When you run it with Linking set to Sdk Assemblies Only, it appears that it doesn't deserialize Size and Point objects.  I have created a sample solution that demonstrates this.  You can get in from GitHub:

Comment 1 John Miller [MSFT] 2017-06-26 14:44:56 UTC
I was able to reproduce this issue using the test project with the following versions:

Microsoft Visual Studio Enterprise 2017 
Version 15.2 (26430.12) Release
Microsoft .NET Framework
Version 4.7.02046

Xamarin (1be4f0c)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android SDK (9dbc4c5)
Xamarin.Android Reference Assemblies and MSBuild support.

Xamarin.iOS and Xamarin.Mac SDK (4cffddf)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.

To reproduce, edit the Android Options of the Project -> Properties to Link SDK Assemblies for a Debug build. Next, run and deploy to a device. The app will have an unhandled exception because the Size is 0 (not successfully deserialized).
Comment 2 John Miller [MSFT] 2017-06-26 14:45:31 UTC
Created attachment 23117 [details]
Sample Project

Attached the project from GitHub for convenience.