简体   繁体   English

编码为WP7的我的C#应用​​程序无法在部署后的WP8手机上正常启动

[英]My C# app coded for WP7 will not launch properly on WP8 phone with deployment

So, I have created a (C#) WP7 app that doesn't have too much complicated things in it. 因此,我创建了一个(C#)WP7应用程序,其中没有太多复杂的事情。 A webbrowser control, IsolatedStorageSettings, and some other basic stuff. Web浏览器控件,IsolatedStorageSettings以及其他一些基本内容。 When I tested this app on one of my WP7 devices, it works perfectly. 当我在一台WP7设备上测试该应用程序时,它可以完美运行。 Debugging works fine. 调试正常。 Deploying also works fine. 部署也可以。 The app is acting completely normal. 该应用程序运行完全正常。

When I then got hold of a Nokia Lumia 822, I developer unlocked the device. 然后,当我拿到诺基亚Lumia 822时,开发人员解锁了该设备。 I deployed the WP7 version of the XAP file, and then tried it. 我部署了XAP文件的WP7版本,然后尝试了它。 First launch, it works perfectly! 首次启动,效果完美! Then, I completely exit the app with the back button. 然后,我使用“后退”按钮完全退出该应用程序。 I try opening it again, and what happened? 我尝试再次打开它,发生了什么事? It doesn't even show the splash screen. 它甚至不显示启动屏幕。 I try launching it a few more times, doesn't work. 我尝试将其启动几次,但是不起作用。

I restarted my WP8 device. 我重新启动了WP8设备。 I then started up my app again, and it worked. 然后,我再次启动了我的应用程序,并且该程序正常运行。 I did what I did last time, exit out of the app and then restart it. 我做了我上次所做的事情,退出了应用程序,然后重新启动它。 The issue comes up again, no splash screen. 问题再次出现,没有启动画面。

After I was frustrated enough, I fired up Visual Studio 2012. I connected my WP8, and then debugged it. 感到沮丧之后,我启动了Visual Studio2012。我连接了WP8,然后对其进行了调试。 Works fine! 工作正常! I exit the app on the device using the back button, and Visual Studio still thinks the app is running. 我使用后退按钮退出设备上的应用程序,Visual Studio仍然认为该应用程序正在运行。 I then restart the app from the device, and it works again! 然后,我从设备重新启动该应用程序,它又可以正常工作了! I tried that again, and it still worked. 我再次尝试,但仍然有效。 Whenever the app isn't in debugging mode, it crashes. 每当应用程序未处于调试模式时,它就会崩溃。 Whenever the app is in debugging mode, it works. 只要该应用处于调试模式,它就可以工作。

Here is a video of what's happening: http://youtu.be/3zKFxj98liY 这是正在发生的事情的视频:http: //youtu.be/3zKFxj98liY

Anyone have a solution to this? 有人对此有解决方案吗?

Haha, I just found out the reason! 哈哈,我才发现原因! Clipboard.SetText is not supported on WP8 anymore and it crashes the app. WP8不再支持Clipboard.SetText,它会使应用程序崩溃。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM