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:
- Open the Tools menu and select Options.
- 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.”



Comments