How to fix visual studio 'projects out of date' message each time I run it
I would run a normal Build, twice in a row. The second time, I'd set the MSBUILD verbosity to "Normal" or higher (in Tools->Options, "Projects and Solutions", "Build and Run". I'd read the output carefully to see what gets actually built the second time.
In fact, now that I think of it, if this really is a cycle, then some part of what gets built the second time must be what's causing it to build the third time, etc. Perhaps you have a post-build step in one of the projects that touches an assembly or other resource used as input to an earlier step. With 70 projects in the solution, something like this would be easy to cause inadvertently, and hard to catch. You may have to learn enough about MSBUILD to be able to detect when one of its steps is deciding it needs to build because something changed, then to understand your solution well enough to know that nothing should have changed; then to see that something has changed that should not have changed.
When you're done with this exercise, you may have gained some insight that will enable you to help in breaking the solution into smaller solutions.
Project out of date - do not show this dialog again - and build or not build?
When you have "Do not show this dialog again" checked, it remembers the choice you make.
If you press Yes while the check box is checked, it will be
Don't show and do build
If you press No while the check box is checked, it will be
Don't show and don't build
The setting that is changed based on your choice is located in the Tools->Options menu.
Go to the "Projects and Solutions" group, and choose the "Build and Run" page.
The first dropdown box, "On Run, when projects are out of date", will show what action is taken when you try to run when projects are out of date.
"Prompt to build" will show the dialog in your question. The other two options are self-explanatory, Always or Never build.
An extra note, if you press Cancel on the dialog, then nothing is done. No settings are changed, no build is started, and the out of date project output is not launched. It's like the dialog never opened in the first place.
Visual Studio : These projects are out of date. Where does Visual Studio get its information from?
This problem can also be caused by a subtle change to a project. If a header file was deleted from a folder, and, not removed from the project, Visual Studio will think it needs to rebuild the project. For VS2010, the following Microsoft blog post highlights the problem and the resolution. I would suggest you eliminate this possibility by checking that all files in the project(s) actually do exist.
Re-enable this project is out of date Dialog Box
You can switch it back on at Tools -> Options -> Projects and Solutions -> Build and Run.
There first option showing a combobox is "On Run, when projects are out of date:".
There you have to select "Prompt to build".
See also:
https://developercommunity.visualstudio.com/content/problem/8263/the-setting-on-run-when-projects-out-of-date-has-n.html
Visual Studio 2010 always thinks project is out of date, but nothing has changed
For Visual Studio/Express 2010 only. See other (easier) answers for VS2012, VS2013, etc
To find the missing file(s), use info from the article Enable C++ project system logging to enable debug logging in Visual Studio and let it just tell you what's causing the rebuild:
- Open the
devenv.exe.config
file (found in%ProgramFiles%\Microsoft Visual Studio 10.0\Common7\IDE\
or in%ProgramFiles(x86)%\Microsoft Visual Studio 10.0\Common7\IDE\
). For Express versions the config file is namedV*Express.exe.config
. Add the following after the
</configSections>
line:<system.diagnostics>
<switches>
<add name="CPS" value="4" />
</switches>
</system.diagnostics>- Restart Visual Studio
- Open up DbgView and make sure it's capturing debug output
- Try to debug (hit F5 in Visual Studio)
Search the debug log for any lines of the form:
devenv.exe Information: 0 : Project 'Bla\Bla\Dummy.vcxproj' not up to date because build input 'Bla\Bla\SomeFile.h' is missing.
(I just hit Ctrl+F and searched for
not up to date
) These will be the references causing the project to be perpetually "out of date".
To correct this, either remove any references to the missing files from your project, or update the references to indicate their actual locations.
Note: If using 2012 or later then the snippet should be:
<system.diagnostics>
<switches>
<add name="CPS" value="Verbose" />
</switches>
</system.diagnostics>
Related Topics
Overload Resolution and Arrays: Which Function Should Be Called
C++ "Named Parameter Idiom" VS. Boost::Parameter Library
How to Use a Lambda Expression as a Template Parameter
Proper Way of Casting Pointer Types
Intel Avx: 256-Bits Version of Dot Product for Double Precision Floating Point Variables
Inet_Pton': Identifier Not Found
Avoid Warning 'Unreferenced Formal Parameter'
Constructor Conditionally Marked Explicit
Use #Ifdefs and #Define to Optionally Turn a Function Call into a Comment
C++ Check If Statement Can Be Evaluated Constexpr
How to Store a Lambda Expression as a Field of a Class in C++11
What Are _Mm_Prefetch() Locality Hints
How to Simulate Interfaces in C++
Why Can't I Static_Cast Between Char * and Unsigned Char *
How to Use a C++11 to Program the Arduino
Partial Ordering with Function Template Having Undeduced Context