Reputation: 126
Strange one this. If I build my c# VS2005 project the build fails, which it should do. However if I hit F5 the app runs. I presume its using the last good build, but I can't for the life mf me see where to turn this off. I also can't remember turning it on!!
Any help appreciated
Jason
Upvotes: 1
Views: 143
Reputation: 13038
Deleting your executable as a pre-build step is an option.
But I agree that simply disabling it in options as suggested in other answers in a nicer solution.
Upvotes: 0
Reputation: 7209
maybe your system time is back from now. It may thought there is still successful build?
Upvotes: 0
Reputation: 41573
My guess is that sometime when you built, it failed and asked if you wanted to use the last successful build. You probably said yes and checked the box that will always enable that option so now it defaults to the last good build regardless if it built or not.
To change this, go to: Tools -> Options -> Projects and Solutions -> Build and Run and change the "On Run, when build or deployment errors occur:" to whatever suits you.
Upvotes: 5