This is the error message.
An exception of type 'System.InvalidOperationException' occurred in System.Windows.ni.dll but was not handled in user code Additional information: Error displaying MessageBox. The most common reason is attempting to call Show while an application is launching or being activated. Wait for page navigation events before calling Show.
It happens right at the beginning when the app is launching and stopped at this function in the first if statement when trying to show the message box.
Code source = How to implement a trial experience in a Windows Phone app
private void CheckLicense()
{
// this displays a dialog so that we can simulate trial mode being on or off.
#if DEBUG
string message = "Press 'OK' to simulate trial mode. Press 'Cancel' to run the application in normal mode.";
if (MessageBox.Show(message, "Debug Trial",
MessageBoxButton.OKCancel) == MessageBoxResult.OK)
{
_isTrial = true;
}
else
{
_isTrial = false;
}
#else
_isTrial = _licenseInfo.IsTrial();
#endif
}
CheckLicense()function? - har07