Reputation: 10267
The "RootFrame = " line in this code, all of which is auto-generated:
private void InitializePhoneApplication()
{
if (phoneApplicationInitialized)
return;
// Create the frame but don't set it as RootVisual yet; this allows the splash
// screen to remain active until the application is ready to render.
RootFrame = new PhoneApplicationFrame();
RootFrame.Navigated += CompleteInitializePhoneApplication;
// Handle navigation failures
RootFrame.NavigationFailed += RootFrame_NavigationFailed;
// Handle reset requests for clearing the backstack
RootFrame.Navigated += CheckForResetNavigation;
// Ensure we don't initialize again
phoneApplicationInitialized = true;
}
...fails with:
*System.TypeInitializationException was unhandled by user code HResult=-2146233036 Message=The type initializer for 'TaSLS_PhoneApp.App' threw an exception. Source=TaSLS_PhoneApp
TypeName=TaSLS_PhoneApp.App StackTrace: at TaSLS_PhoneApp.App.set_RootFrame(PhoneApplicationFrame value) at TaSLS_PhoneApp.App.InitializePhoneApplication() at TaSLS_PhoneApp.App..ctor() InnerException: System.NotImplementedException HResult=-2147467263 Message=The method or operation is not implemented. Source=Windows StackTrace: at Windows.Storage.ApplicationData.get_RoamingSettings() at TaSLS_PhoneApp.App..cctor() InnerException:*
Upvotes: 0
Views: 631
Reputation: 9604
The root cause isn't the generated code, but your code that it is calling...
TaSLS_PhoneApp.App.InitializePhoneApplication() at TaSLS_PhoneApp.App..ctor() InnerException: System.NotImplementedException HResult=-2147467263 Message=The method or operation is not implemented. Source=Windows StackTrace: at Windows.Storage.ApplicationData.get_RoamingSettings() at TaSLS_PhoneApp.App..cctor() InnerException:*
It looks like in your app's InitializePhoneApplication
is calling a WinRT function which isn't implemented on Windows phone 8. See MSDN documentation at:
http://msdn.microsoft.com/en-gb/library/windows/apps/windows.storage.applicationdata.roamingsettings.
Upvotes: 2