I am new to developing for Microsoft's UWP platform after developing for 2 years on Silverlight.
I have started working on a project to get XML from a website and parse it to display it inside a Windows UWP app. The code that I use works fine in the Debug Configuration on ARM, but fails to work in Release Configuration.
Here is my code:
protected override async void OnNavigatedTo(NavigationEventArgs e)
{
// Loading xml from storagefile
...
// Parsing Xml
XElement xmlitems = XElement.Parse(myXml);
List<XElement> elements = xmlitems.Descendants("item").ToList();
...
}
This code works fine in Debug Config, but crashes the app in Release config. A try-catch block also fails to identify and prevent the app from crashing.
Update:
I did some tests and found out that the app crashes during parsing, so it is not related to the way I get the XML. The xml is read from the file correctly and is valid based of w3school's XML validator and other third party validators.