簡體   English   中英

從Windows Phone 7.5項目升級到WP8的問題

[英]Problems with upgrade from a Windows Phone 7.5 project to WP8

我正在嘗試維護針對WP7.5和WP8的兩個版本的應用程序。 我從WP7.5應用程序開始,並添加了帶有鏈接文件的項目副本。 然后,我通過Visual Studio命令將“鏈接”項目升級到WP8。 當我在模擬器上運行WP8應用程序時,執行MessageBox.Show()命令時,它System.InvalidOperationException in System.Windows.ni.dll而崩潰。 輸出窗口FileNotFoundException in mscorlib.ni.dll前面提到的錯誤消息之前FileNotFoundException in mscorlib.ni.dll顯示FileNotFoundException in mscorlib.ni.dll

我嘗試將mscorlib.dll添加到WP8項目中,但是VS告訴我它已被引用。 我還嘗試在WMAppManifest中設置所有功能,如在類似線程中看到的那樣,但問題仍然存在。 誰能給我一個提示?

下面是我執行后的輸出。 我希望你不要介意德語。

在此處輸入圖片說明

Windows 8 Windows Phone 8: In Windows Phone 8 if you call Show method from the app Activated or Launching event handlers an InvalidOperationException is thrown with the message Error Displaying MessageBox. Alternatively, you should call the Show method from the Page.OnNavigatedTo(NavigationEventArgs) method.

在MSDN中發現了這一點,這適用於我的情況。 那正是我的問題。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM