Posted By: Anonymous
I have a very similar problem as described here.
I also upgraded a mixed solution of C++/CLI and C# projects from Visual Studio 2008 to Visual Studio 2010. And now in Visual Studio 2010 one C++/CLI project always runs out of date.
Even if it has been compiled and linked just before and F5 is hit, the messagebox “The project is out of date. Would you like to build it?” appears. This is very annoying because the DLL file is very low-tiered and forces almost all projects of the solution to rebuild.
My pdb settings are set to the default value (suggested solution of this problem).
Is it possible the get the reason why Visual Studio 2010 forces a rebuild or thinks a project is up to date?
Any other ideas why Visual Studio 2010 behaves like that?
For Visual Studio/Express 2010 only. See other (easier) answers for VS2012, VS2013, etc
- Open the
devenv.exe.configfile (found in
%ProgramFiles%Microsoft Visual Studio 10.0Common7IDEor in
%ProgramFiles(x86)%Microsoft Visual Studio 10.0Common7IDE). For Express versions the config file is named
Add the following after the
<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 ‘BlaBlaDummy.vcxproj’ not up to date because build input ‘BlaBlaSomeFile.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>