Prevent Visual Studio from running old versions of a program with syntax errors

If a program's code contains syntax errors, then by default if you try to run the program Visual Studio says:

You pretty much always want to click No. If you click Yes, an older version of the program runs so you won't see any of the changes that you recently made and you may incorrectly think the new code works properly. (This is a common beginner mistake.)

To prevent Visual Studio from even asking if you want to run the old version, follow these steps:

  1. Open the Tools menu and select Options.
  2. Expand the Options tree to go to projects and Solutions > Build and Run. On the right set “On Run, when build or deployment errors occur” to “Do not launch.”

 

What did you think of this article?




Trackbacks
  • No trackbacks exist for this post.
Comments
  • No comments exist for this post.
Leave a comment

Submitted comments are subject to moderation before being displayed.

 Name

 Email (will not be published)

 Website

Your comment is 0 characters limited to 3000 characters.