UWP C#如果崩溃,如何自动重新启动UWP应用
我想找出是否有任何方法可以自动重新启动UWP应用程序崩溃?我的UWP应用程序在Windows 10上运行。 请指教。
谢谢。
I would like to find out if there is any way to auto restart UWP app if it crashes? I have my UWP app running on windows 10.
Please advise.
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当前,UWP崩溃后无法自动重新启动。当应用崩溃时,代码将断开。一种可能的方法是,您可以创建一个Win32应用程序,该应用检测到UWP应用程序的过程,当该过程退出时,请再次启动UWP应用程序。
此外,我建议处理异常,而不是在应用程序崩溃后重新启动。
Currently, UWP doesn't have a way to auto restart after it is crashed. When the app is crashed, the code will break. A possible way is that you could create a win32 app that detects the process of the UWP app, when the process exits, launch the UWP app again.
Besides, I'd suggest handling the exception rather than restarting the app after it is crashed.