Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
317 views
Welcome To Ask or Share your Answers For Others

1 Answer

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.

   VS "Build and Run" Options

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...