I cannot run my UWP app in Release mode, because it always crashes right away when somewhere in my code I am trying to access the CurrentApp.LicenseInformation.
Steps to reproduce: Create a new blank UWP app. Go to MainPage.xaml.cs and add the following:
public sealed partial class MainPage : Page
{
public MainPage()
{
this.InitializeComponent();
Loaded += MainPage_Loaded;
}
private void MainPage_Loaded( object sender, RoutedEventArgs e )
{
ProductIapTextBlock.Text = CurrentApp.LicenseInformation.ProductLicenses[ "hello" ].IsActive.ToString();
}
}
Now change to Release mode and x86 platform and try to run the app. It should crash with the errors as in the image above.
What is wrong here? Is the problem hidden in my code or is it a problem in UWP?