Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is Visual Studio 2008 always rebuilding my whole project?

I have a Visual Studio project with about 60 C++ source files. I can do a build, and it completes without errors. But if I immediately hit F7 again, it always re-compiles about 50 of the source files. It doesn't re-compile all of the files, which is strange.

I have 'Enable minimal rebuild' (/Gm) set. Any ideas why it might be doing this? None of the files have a Modified Date in the future.

like image 644
Rocketmagnet Avatar asked Jun 20 '09 20:06

Rocketmagnet


People also ask

Why is Visual Studio rebuilding every time?

The problem Sometimes, Visual Studio will always rebuild projects, even though they have recently been built and there are no changes. If you build , and then run the project will build. If you haven't disabled the “projects out of date”-dialog, it will pop up and ask you to rebuild.

What does clean solution do in Visual Studio?

Choose Clean Solution to delete any intermediate and output files. With only the project and component files left, new instances of the intermediate and output files can then be built.

How do you stop a build in Visual Studio?

You can hit Ctrl + Break on the keyboard to cancel/stop a build that is currently in progress.


1 Answers

Are any of your file dates in the future? This can occur if you changed time zones or changed the system clock time. Dates in the future will confuse the IDE and force a rebuild every time F7 or F5 is hit.

like image 192
Robert Harvey Avatar answered Oct 03 '22 08:10

Robert Harvey