views:

66

answers:

3

Hi All,

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

+5  A: 

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.

Polaris878
Yep that sounds like it might be the case, where can i turn this off? I have looked in Tools->Options->Debugging but can't see anything
Jay
found it!!! Tools-Options->Projects and Solutions
Jay
A: 

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.

EFraim
A: 

maybe your system time is back from now. It may thought there is still successful build?

ufukgun