The follow code is a simplistic example of the issue that I'm having. This was working fine on IoT Core but now when debugging it jumps over var personJson line and never sets a value. I've tested this same code in a blank UWP app and ran it fine on my desktop.
I'm running Windows IoT Core v.10.0.16299.371 on a Raspberry Pi3 B. I'm sure the code was working on v.10.0.16299.309.
Anyone have an idea of what may be happening?
public sealed class StartupTask : IBackgroundTask
{
private BackgroundTaskDeferral deferral;
public void Run(IBackgroundTaskInstance taskInstance)
{
deferral = taskInstance.GetDeferral();
LoadPerson();
}
private void LoadPerson()
{
Person person = new Person();
person.firstName = "John";
person.lastName = "Doe";
person.age = 21;
var personJson = JsonConvert.SerializeObject(person, Formatting.Indented);
}
}
public sealed class Person
{
public string firstName { get; set; }
public string lastName { get; set; }
public int age { get; set; }
}