[uwp]使用具有CopyToOutputDirectory的文件调试VS中的挂起,终止和恢复 [英] [uwp]Debugging Suspend, Terminate and Resume in VS with a file that has CopyToOutputDirectory

查看:295
本文介绍了[uwp]使用具有CopyToOutputDirectory的文件调试VS中的挂起,终止和恢复的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Visual Studio 2017中调试UWP应用程序时出于某种原因,我似乎无法暂停&终止然后恢复(通过单击播放按钮),但是如果应用程序至少有一个文件明确定义了CopyToOutputDirectory(可以是Always或IfNewer),则只需 。成功暂停后&终止(通过Lifecycle事件),再次运行应用程序将强制Visual Studio
重新编译应用程序并重新部署,替换任何已保存的暂停状态。



重现步骤:

It seems to be that for some reason while debugging UWP apps in Visual Studio 2017, I am unable to Suspend & Terminate and then resume (by clicking the play button), but only if the app has at least one file where the CopyToOutputDirectory is explicitly defined (either as Always or IfNewer). After a successful Suspend & Terminate (via the Lifecycle events), running the app again will force Visual Studio to recompile the app and re-deploy, replacing any saved suspension state there was.

Steps to repro:


  1. 在解决方案资源管理器中,右键单击文件并转到"属性"
  2. 在标记为"复制到输出目录"的部分选择"始终复制"或"复制如果更新"
  3. 运行应用程序
  4. 在生命周期事件中,单击下拉菜单和"暂停&终止" ;.请注意应用程序如何变为白色。
  5. 点击"运行"按钮。按钮再次。注意VS如何重建应用程序并忽略暂停+恢复状态。

这有什么变通方法吗?

谢谢,

Nolan

推荐答案

你好nolanblew-p,

Hi nolanblew-p,

我们知道,当我们调试我们的UWP应用程序时,我们会看到生命周期事件包含Suspend,Resume,Suspend& shutdowm,其他后台任务。我找不到'Suspend& amp;终止'生命周期事件。你能确认哪里能找到这个活动吗?

As we know, when we debug our UWP app, we will see the lifecyle events contain Suspend , Resume, Suspend & shutdowm , other backgroundtask. I cannot find the 'Suspend & Terminate' lifecycle event. can you confirm that where this event can be found?

通常,当我们点击下拉列表并"暂停& amp;关闭",Visual Studio 2017和应用程序将关闭。当你启动它时,应用程序将重建 d

Usually, when we click the drop down and "Suspend & shutdowm", the Visual Studio 2017 and app will close. The app will be rebuild when you start it.

最好的问候,

Yong Lu


这篇关于[uwp]使用具有CopyToOutputDirectory的文件调试VS中的挂起,终止和恢复的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆