UWP C#如果崩溃,如何自动重新启动UWP应用

发布于 2025-02-08 00:59:41 字数 76 浏览 1 评论 0原文

我想找出是否有任何方法可以自动重新启动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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

滥情哥ㄟ 2025-02-15 00:59:41

当前,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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文