VisualStudio: 重新启用“生成失败,运行上次成功吗?”对话框

当一个构建失败时,VS 会弹出一个选项来运行最后一个成功的构建。有人在我的机器上点击了“是”和“不要再显示这个对话框”,现在我被这个设置卡住了。我怎么才能重置它?

31057 次浏览

The process is as follows for Visual Studio 2010 and above (but should be similar for previous versions):

  • On the menubar go to: 'Tools' --> 'Options'
  • Go to 'Project and Solutions' --> 'Build and Run'
  • There you can find a combobox under the label 'On run, when build or deployment errors occur...'. Select an appropriate option.

To enable this option on Microsoft Visual Studio Community 2022, Run Previous Successful build

  1. Go to tools -> Options.
  2. Under Projects & Solutions choose build & Run
  3. On the prompt "On Run, when build or deployment errors occur:" choose Prompt to launch.
  4. And now click Ok.

On next time, if any error occurs then Visual Studio will generate an error to run previous successful build.