繁体   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