Visual Studio 2010 projects always out of date
-
Friday, September 03, 2010 6:08 PMI've found this question asked many times, but, with no real solid resolution. We have a solution that consists of dozens of projects. Most projects produce a ".lib" file that is then linked by an associated "link" project. The link prokect produces the output dll we need. This worked fine for Visual Studio 2008. But, for Visual Studio 2010 I now get the dreaded "projects are out of date" dialog box. I've used the technique speicied in https://connect.microsoft.com/VisualStudio/feedback/details/532236/visual-studio-2010-c-project-project-is-permanently-out-of-date-build-necessary?ppud=0&wa=wsignin1.0 to determine what is possibly going on. Initially, we did have some files that were in the projects and were no longer on the hard drive. These have been cleaned up, so, that's not the problem. Yet, when I clean the entire solution, build all projects and debug, I still get the same dialog box. I used DebugView to display the build trace messages. Most times, it complains about the .pdb files or the .exp files. Is there any way out of this mess? I've spent way too much time tyring to figure this out. This should not happen from one release of Visual Studio to another!
Gort, Klaatu, Barada Nikto
All Replies
-
Tuesday, September 07, 2010 10:27 AMModerator
Hi Barada,
"Projects are out of date" dialog will be poped up when the time stamp of input files are newer than output files. So please try to delete all the Debug folder to see if it works fine.
If this does not help, could you give me detailed steps to reproduce this issue? Thanks.
Regards,
Nancy Shao [MSFT]
MSDN Subscriber Support in Forum
If you have any feedback on our support, please contact msdnmg @ microsoft.com
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us. -
Tuesday, September 07, 2010 5:47 PM
Nancy:
Thanks for the reply. I deleted the debug folders and rebuilt my solution. Unfortunately, I still have the problem. The DebugView window states that I have two projects that are not up-to-date because the PDB files were touched after the build was finished on the projects in question. This is obvious to me because, as I stated earlier, our solution consists of several "library" projects that compile and build a library (.lib) file. There is an assoicated "link" project that uses the compiled objects from the "library" project and produces a .dll file. Due to solution dependencies, the "library" projects typically build in advance of the "link" project. And, since the .PDB is produced from the "link" project, it would follow that its time stamp would not match the time stamp of the "library" project. As I also stated earlier, this solution configuraiton works fine when building on Visual Studio 2008.
Here is an example of the message from the DebugView window. At times, it complains about the .PDB, .EXP, or even, the .DLL file.
[4588] Project 'C:\Mastercam source\Mastercam X6\MCPrvVerFile\MCPrvVerFileLib.vcxproj' not up to date because the build input 'C:\MASTERCAM SOURCE\MASTERCAM X6\MCPRVVERFILE\DEBUG\MCPRVVERFILE.PDB' was touched on 09/07/2010 11:35:09 which is after the last build finished on 09/07/2010 11:34:31.
To reproduce this problem, create and build several "library" projects. That is, the project's only job is to produce a .lib file from the compiled source. Then create and build an associated "link" project for each "library" project. Its sole purpose is to link the objects produced from the "library" project into a .dll file.
Please let me know if you need more info. I'd like to resolve this issue soon since I've been dealing with it for quite a while.
Gort, Klaatu, Barada Nikto -
Wednesday, September 08, 2010 8:50 AMModerator
Hi Barada,
Could you please give me detailed steps to reproduce this issue? I can't reproduce this issue based on your last reply. Thanks.
Regards,
Nancy Shao [MSFT]
MSDN Subscriber Support in Forum
If you have any feedback on our support, please contact msdnmg @ microsoft.com
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us. -
Wednesday, September 08, 2010 12:50 PM
1. Create a solution that consists of many projects. Our solution has 63 projects.
2. Design the projects such that project A1 has source code (.cpp and .h) that is compiled to produce a library file (.lib). We do this because we typically export many classes and functions from the library.
3. Design another associated project, A2, that uses the objects produced from A1 and creates a dynamic link library (.dll). The result of steps 2 and 3 should be two files: a library file (for example, "A.lib") and an assoicated dynamic link library (for example, "A.dll").
4. repleat steps 2 and 3 several times.
5. Clean and build the solution.
6. Debug the solution. This is when we get the message I posted earlier. I've noticed that we don't get the message for projects that are not split into two. For example, project B produces a library file AND a dynamic link library. It does not use a second project to produce the dynamic link library.
As I stated earlier, our dependencies are set up such that all of the "library" projects are built first so that the subsequent build of the dynamic link libraries have access to the exported classes/functions that they need to import.
I hope you can help resolve this...
Gort, Klaatu, Barada Nikto -
Friday, September 10, 2010 5:35 PM
Nancy:
I've been trying to resolve this for some time now, and, I've done some analysis on our solution and projects. A basic question needs to be answered. Our "library" projects produce a library file (.LIB), an export file (.EXP) and a program database file (.PDB). Due to project dependencies, all of our "library" projects are built in advance of the "link" projects that produce dlls. When the dll projects are built, the associated program database file (.PDB) is "touched". It is the .PDB file that consistently is the reason for the "library" projects to be out of date. This seems logical since the "link" projects are built after the "library" projects, but, this was not a problem in Visual Studio 2008. What has changed in Visual Studio 2010 so that now the time stamp of the .PDB, .EXP, etc. are now considered input to the build process? How can I successfully build the solution so that it is considered up to date?
Gort, Klaatu, Barada Nikto -
Tuesday, October 26, 2010 5:44 PM
Hi:
One of the things we have seen is that FileTracker causing such issues. Could you try disabling File tracker for the project and try?
This is done by adding the highlighted in the respective vcxproj file:
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<TrackFileAccess>false</TrackFileAccess>
</PropertyGroup>
.
.
.
REST OF THE VCXPROJ
Disabling Filetracker you would lose incremental linking.
Wendell
- Proposed As Answer by Daniel Stine Thursday, June 02, 2011 6:23 PM
-
Wednesday, November 10, 2010 8:31 AM
Hi all,
We have the same problem with C++/CLI projects. Every time we want to run or debug the solution from VS2010, it will result in building all C++/CLI projects.
Even if there are no changes all C++/CLI projects are being built unnecessary. We didn't have this issue in VS2005.
@Wendell
Disabling TrackFileAccess didn't help.
Easen
-
Saturday, December 25, 2010 9:55 AM
I had a different problem: Visual Studio 2010 was creating duplicate folders if the solution folder had special characters on it. "Comércio Eletrônico" became "Comércio Eletrônico" (Eletronic Commerce). Whenever I compiled the project, the new folders appeared with only .TLOG files in it.
Disabling the File Track solved the problem. I'm using Visual Studio 2010 Pro - v 10.0.30319.1.
Sidney Benetti
-
Sunday, February 13, 2011 3:36 AMI have this same issue with a mixed mode dll which links everytime it's built from the command line. The dll is an MFC extension dll project with /clr on. We plan on using this dll in roughly 200 of our applications and we really can't have all of these rebuilding everytime we do an incremental build.
This seems to be a 2010 issue and can easily be recreated following the steps below with a new project.
- Create new MFC extension dll project
- Turn on /clr option at the project level, most of the other settings that need to be changed for this are done for you automatically
- Compile the project using msbuild from the command line and you will see the link target executes every time, log file contains the message below (You will not see this occur in the IDE ).
Following the same steps above in 2008 the issue did not appear.
Kurt
-
Wednesday, March 02, 2011 9:14 PMWe have also the same problem. Not for a mixed mode project however, but msbuild also reports that the .exp file is out of date and required a re-linking. A workaround seem to be to disable incremental linking.
-
Thursday, June 02, 2011 7:11 PM
This fixed the constant recompilation for me.
Note you have to edit all your .vcxproj files AND delete all the intermediate files for this magic to take effect.
Clearly something's wrong with the tracking log system.
Unfortunately, now executable projects don't relink if dependent library projects are rebuilt.
M/S seriously broke the build system with VS2010 -- at least for native C++ developers. Tell me again why we lost the gorgeously simple Project Dependencies functionality which automatically linked dependent libraries in favor of this obtuse Framework and References project-to-project references interface??? But I digress.
Dan
-
Thursday, February 16, 2012 7:32 PM
Nacy Shao,
For me the steps are extremely easy.
1.) Open VS 2010
2.) File/New/Project - pick the MFC application wizard. I pick c:\temp as the directory for the project, I choose "rerererebuild" for the project name.
3.) accept all defaults (just hit the finish button)
4.) Build the default (debug) target.
5.) Hit F5
I am immediately presented with a dialog telling me the project is out of date.
R.D. Holland
-
Thursday, March 15, 2012 3:08 AMPlease fix this. I've tried all the suggestions posted, and none of them have worked. This is both a thorn in my side and a pebble in my shoe.
-
Thursday, April 05, 2012 4:59 PM
I took a look at all the normal files generated during a build and when I hit F5 to run I see that none of the output files are changed if I go ahead and answer "yes" when it tells me the project is out of date and do I want to build. Indeed if I indicate that it should build, the IDE output window shows messages that each target it needs to build is up to date.
I was thinking that perhaps some race condition occurred where separate threads were writing out files and perhaps the .lib or .pdb etc may show a time in Explorer but perhaps the times differed past the seconds. So it appears that either there is just a bug or some of the intermediate files (there are a lot in VS2010) cause this. It does not appear to be an issue with compiling or linking since nothing compiles and nothing links.
R.D. Holland
-
Wednesday, September 05, 2012 2:03 PM
BUMP ... I also have this issue. I'm rapidly coming to the conclusion that the tracking system doesn't work. So this is a fundamental issue of the highest importance.
Where did Nancy go? Can we get another MSFT rep to reply. Nancy, you were given repro steps, did you repro this, silence isn't helpful in fact makes me worry that no matter what I try the system is flawed, I don't want to waste my time trying things if that is the case.
We need...
1) Justify the out of date project. Please give us the ability to trace or some indication of the file operations that indicate to the tracker program which file signify the project as out of date. You might consider showing the time stamps in these calculations too.
2) Documentation on how the dependency system works, how the tracker program works and how to understand the .tlog files. I've been experimenting with the tlog files trying to understand their use, I think I get it, but I'd like to double check with some docs.
-
Friday, September 14, 2012 10:06 AM
Hey,
my workmate told me that this problem is due to the project type is still Visual Studio 8 (in general: an older one than 2010). When you save yout old projects as VS 2010, than the problem is solved...
regards
AlfAlsPro
-
Saturday, September 15, 2012 3:36 PMMy projects were all converted to 2010. All of our projects use the new file extension for 2010, .vcxproj.
R.D. Holland
-
Monday, September 17, 2012 3:07 AM
I found this thread after searching for solution to the Out of Date problem. I'm a total newbie trying to follow university lab instruction to create my first "Hello World" program and it fails.
Steps to reproduce the problem.
I downloaded and installed the Visual Studio Express 2012 for the Desktop from here http://www.microsoft.com/visualstudio/en-us/products/2010-editions/express
File > New, in the New Project windows, selected Visual C++ and Win32 Console Aplication
Click Finish in the next window (the Application Wizard)
the screen capture shows the screen that appears and the "Out of Date" message that appears after clicking the green arrow to execute the default code.
I also installed Visual Studio 2010 on a laptop, followed the same steps, and it gave the same error.- Edited by RossRoss Monday, September 17, 2012 3:33 AM
-
Thursday, September 20, 2012 4:28 PM
I get this sometimes too in a solution with many projects that depend on each other.
Usually when I've been editing and building some of the projects within the solution.
I've found that Rebuilding the entire solution (ctrl + alt + F7) usually works, (in other words rebuild the entire solution rather than each individual project manually). I'm not saying you need to do this all the time only when this problem occurs.
I'm no expert, but I think what may be happening is that projects that depend on each other needs to be built in a certain order and this is what Rebuild Solution ensures. I think the regular Build Solution (F7) only builds the projects that has been changed, but I might be completely wrong about this. Anyways (ctrl + alt + F7) usually works for me :)
Karl Hansson Sweden
-
Monday, September 24, 2012 2:01 PM
After some investigation I have discovered the cause of this, using sysinternals debugview I traced through the debug from VS2010 C++ .net System diagnostics.
I discovered the files that were marking the build as out of date. These were DELETED .h files, yes DELETED, yet the .tlog files still held a reference to them, a project clean OR direct deletion of the tlog files and the annoying dialog pops up are no more!
Sadly this seems to indicate that there are bugs regarding deletion of files when uses the dependency tracking track.exe program. ( can MS confirm ? ) A tlog edit is not a very nice solution.
- Follow this guide to view C++ project logging
http://blogs.msdn.com/b/vsproject/archive/2009/07/21/enable-c-project-system-logging.aspx
- make sure you change the correct file
- shutdown VS2010 when you are doing it.
- I was required to chnage the integrity level of debugview to get it to work.
icacls dbgview.exe /setintegritylevel low
Hope that helps somebody,
Spurtus.
- Proposed As Answer by Spurtus Monday, September 24, 2012 2:01 PM
-
Monday, September 24, 2012 2:17 PM
Spurtus,
Sorry but doing a "clean" or "rebuild all" does not always fix the problem (I have never actually seen that make a difference). Nor is the problem only related to some deleted .h files as I can create a new MFC project, make no changes, build and then run and be told the project is out of date.
I think there is a race condition between the threads that are involved in a build. I base this on my experience with building a lot of projects that have this problem. I can build and run and see the dialog eight times out of ten. But every once in a while, I build and run and the problem does not show up. From then on, with that project I can stop and restart debugging with no issue as many times as I want. But the odds are if I then modify a file so I have to build, when I run after the build, I am told the project is out of date again.
R.D. Holland
-
Monday, September 24, 2012 4:50 PM
R.D. your problem could be related to likes of virus scanning, it has been known to inject itself into the build process, the virus scanner config files / exe become a dependency of the tracker system!
If you enable the .Net diagnostics I suggested you should be able to quickly determine which file(s) is flagging your build as out of date. ( within reason I really wish this diagnostic was sent to the output window by default )
Regards,
Spurtus.
-
Thursday, September 27, 2012 11:12 PMHow would that explain the fact that I have the same virus scanning software and I have Visual Studio 2005, 2008 and 2010 but only 2010 has this problem?
R.D. Holland
-
Tuesday, April 09, 2013 1:01 PM
I used debugview and all it shows is the lines below. So where is the dpiaware.manifest file on my machine? In the visua studio install directory. But I did not choose the default install dir so where it is looking is wrong. But this doesn't even make sense to me as not every project I have exhibits the problem. And not every project I have the problem with builds an exe (but exes typically do).
One other note of interest. The other day I was chaning a .h file and I had a syntax error. I saw the "Error List" pane had intellisense errors in it. One of the lines pointed to an include file that was including another .h file that intellisense indicated could not be found (it was not in my "path"). The include file was stdafx.h. So I removed the entry. My issue went away. Until I found that another project would not compile. It turned out the stdafx.h file I modified was from the second project. So I had reinstate the file to build that project. I searched the first project to see if somehow it included the other project's stdafx.h file but found no connection. I sure with intellisense had a dependency tool that showed from where it was getting the files it was parsing. In any case, dbgview doesn't show that file. And the only time intllisense listed the file was when I did something wrong and causes IS to dump data to the "Error List" pane.
[2776] devenv.exe Information: 0 :
[2776] Project 'Z:\ENGINE\SRC\APP\DEV\APP.vcxproj' is not up to date because 1 build inputs were missing.
[2776] devenv.exe Information: 0 :
[2776] up to date is missing: 'C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO 10.0\VC\INCLUDE\MANIFEST\DPIAWARE.MANIFEST'
[1900] In DLLCanUnloadNowPerhaps I should uninstall 2010 and resintall in the default dir.
R.D. Holland
-
7 hours 36 minutes ago
We found something that seems to help, at least for awhile.
Go the the project settings and in the manifest tab "input and output" change the DPI awareness. Then close the dialog. Open it back up to set the awareness back to your original value and close out. Do that simply to avoid changing the setting.
I did a diff of the before and after change and the difference is that a new node is added to the vcproj file.
Once I built, the project quit telling me each time I ran it was out of date.
Switch to another config (debug to release, e.g.,) and build and run a few times to see the problem. Then perform the steps again for that config. It fixed release (for me). I did that for each config. When I was done, every config in the vcproj file had the dpi awareness entry in it.
Unfortunately this worked for awhile and now I am back to the freakin tool telling me I am constantly out of date. Not sure what changed. I ran the workflow again (no diffs in vcxproj since I did it previously) to no avail.
But perhaps this can work for you for longer than it did for me.
R.D. Holland

