本文介绍了如何在Visual Studio中启用/禁用编译错误警告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在调试模式下,如果我们的应用程序出现错误,当我们按F5开始调试时,会出现一个对话框,并显示警告:您的程序有错误,要运行上次修改的程序吗?或者这样的东西。



我想启用或禁用此对话框。



我该怎么做?

解决方案

您可以在Visual Studio设置中打开/关闭该提示:


  1. 从工具菜单中选择选项。

  2. 在出现的对话框中,展开项目和解决方案,然后单击构建和运行。

  3. 在右侧,您会看到一个组合框,标有On Run,构建或部署错误发生时。




    • 如果要禁用该消息框,请选择不启动或启动旧版本(将自动启动旧版本)。 li>
    • 如果要启用该消息框,请选择提示启动,每次都会询问您。


   



当然,作为peop le在评论中建议,这意味着你的代码在某处阻止编译的错误。您需要使用错误列表来弄清楚这些错误是什么,然后修复它们。


In debug mode, if there is an error in our application when we press F5 to start debugging, a dialog appears with the warning: "Your program has an error. Do you want to run your last modified program?" or something like this.

I want to enable or disable this dialog.

How can I do this?

解决方案

You can turn that prompt on/off in your Visual Studio settings:

  1. From the "Tools" menu, select "Options".
  2. In the dialog that appears, expand "Projects and Solutions", and click "Build and Run".
  3. On the right side, you'll see a combo box labeled "On Run, when build or deployment errors occur".

    • If you want to disable the message box, select either "Do not launch" or "Launch old version" (which will launch the old version automatically).
    • If you want to enable the message box, select "Prompt to launch" which will ask you each time.

   

Of course, as people have suggested in the comments, this means that your code has errors in it somewhere that are preventing it from compiling. You need to use the "Error List" to figure out what those errors are, and then fix them.

这篇关于如何在Visual Studio中启用/禁用编译错误警告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-18 17:00