2

Visual Studio is not seeming to rebuild changed included files in my project properly. I tried removing the requirement that the file match; though that displays the source code when stepping, it still runs the old code (it would execute commented lines, etc). I could not seem to find any relevant settings wrong. It is set to "Always Build" when project files are out of date.

This is for c++ if relevant

Any help would be appreciated. Thanks!

jon
  • 21
  • 3

3 Answers3

0

You need to check "Build" in Build -> Configuration-Manager as well.

Visual Studio

Configuration manager

Stefan Steiger
  • 78,642
  • 66
  • 377
  • 442
0

Try the Build... Clean menu option followed by the Build... Rebuild Solution menu option.

Mark Allen
  • 1,230
  • 1
  • 15
  • 17
  • That does get it to build correctly, but the problem is still there if I try to simply debug a build. I am looking for a way to not have to clean my build every time I want to debug it. This is the closest I could find to a similar issue elsewhere, but could not figure out how to work the macro manager: http://stackoverflow.com/questions/2376810/force-visual-studio-to-always-rebuild-all-when-debugging – jon Nov 15 '10 at 03:50
0

The only thing that solved this problem for me was to go to Tools-->Options-->Project and Solution-->Build and Run, and set "On Run, when projects are out of date" to "Always build". And that only worked once. I'm still trying to determine what the permanent solution is. I've tried deleting everything in the Bin and Obj folders and still the old code manages to be used when I start debugging.

influent
  • 1,337
  • 3
  • 14
  • 31