views:

109

answers:

2

Hello,

I have a Visual Studio 2005 solution. Every time I try to run the startup project (C++), the project gets build again, although I did not make any change.

How can I get the normal, sane behaviour, where projects get built only when needed?

How can I debug the problem further?

Thanks,

+1  A: 
  1. try a clean then a build of the project/soltuoin

  2. cause a modification of each of the source files so that the datetime modified gets updated ( just add and remove a space from)

steelbytes
Already tried 1) and 2). No effect.
Aram Hăvărneanu
2) did it (using OldFart's PowerShell script). I tried to do the same with a perl script but my script wasn't good enough.
Aram Hăvărneanu
+2  A: 

On at least one occasion I've had files appear that had a last-write-time that was some time in the future. Presumably this occurred because either my computer's clock was wrong when the file was last written or the file came from another computer whose clock was wrong.

That can cause this problem, so check the timestamps on all your source files and check your computer's clock for the correct time.

Try this PowerShell command:

get-childitem . -Recurse | ? { $_.LastWriteTime -gt (Get-Date) }
OldFart
That did it. Thanks a lot! I tried to to the same with a perl script, but somehow my script failed. Thanks again!
Aram Hăvărneanu