1

Using VB 2008

When I press the F5 or Start Debugging it does a rebuild even when I have made no changes since the last time. Where is the setting to tell it to only do a rebuild if there are changes?

MPelletier
  • 16,256
  • 15
  • 86
  • 137
Alex
  • 2,081
  • 14
  • 49
  • 76
  • check your build events. Are any of the build events running commands that are changing the filestamp on any executable ? – Andrew Keith Nov 25 '09 at 05:17

3 Answers3

0

F5 should a build and not rebuild, are you sure it's a rebuild? Even you do not make any changes, a 'pseudo' build is still executed, and should be significant faster than a normal build or rebuild.

EDIT:
My definition of a 'pseudo' build is to check for need to build and/or making sure all files required for debugging are present (e.g. pdb files)

o.k.w
  • 25,490
  • 6
  • 66
  • 63
0

In my installation, F5 (Start Debugging) only builds when changes have been made. This includes changes that don't actually effect the code (like modifying comments). If I do F5, close the program, and push F5 again (without changing anything), no rebuild takes place. Is there something I'm missing?

David Johnstone
  • 24,300
  • 14
  • 68
  • 71
  • When I press F5 it says Build Started even if I just pressed it a second ago and no new changes have been made since. In the past this used to happen until I found a setting that changed this so that it only does a Build when something has changed. But now it seems to have reverted, maybe I changed that setting. But problem is that I don't remember where/what that setting be. – Alex Nov 25 '09 at 05:31
0

As other have mentioned, Visual Studio only rebuilds what it thinks needs rebuilding.

My advice is to check what it actually builds, to see what made the build system think it was out-of-date. I've often seen this issue when, e.g., a custom build step was used, and the output of the step was specificed incorrectly. So VS is expecting a built file (because you told it it would be there), and since the built file is not there, it restarts that specific build step, along with all the projects that depend on the project containing the build step.

This is just one example. It usually boils down to an expected generated file that gets moved or is missing.

If this does not help, maybe a build log would help identifying your issue in more depth.

Bahbar
  • 17,760
  • 43
  • 62