views:

740

answers:

5

I have a very simmilar problem as described here.

I also upgraded a mixed solution of C++/CLI and C# projects from VS2008 to VS2010. And now in VS2010 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 is very low-tiered and forces almost all projects of the solution to rebuild.

My pdb settings are set to default value (suggested solution of this problem).

Is it possible the get the reason why VS2010 forces a rebuild or thinks a project is uptodate?
Any other ideas why VS2010 behaves like that?

A: 

The .net projects are always recompiled regardless. Part of this is to keep the IDE upto date (such as intellisense). I remember asking this question on an MS forum years ago and this was the answer I was given.

Preet Sangha
In VS2008 the project did not rebuild everytime. This is very annoying because the dll is very low-tiered and forces almost all of my dlls to rebuild.Something went wrong on migration and I cannot figure out what.
Christoph Ungersböck
A: 

Most build systems use data time stamps to determine when rebuilds should happen - The date/time stamp of any output files is checked against the last modified time of the dependencies - if any of the dependencies are fresher, then the target is rebuilt.

This can cause problems if any of the dependencies somehow get an invalid data time stamp as its difficult for the time stamp of any build output to ever exceed the timestamp of a file supposedly created in the future :P

Chris Becke
Is it possible the get the reason why VS2010 forces a rebuild or thinks a project is uptodate?
Christoph Ungersböck
In VS6 or perhaps VS2005 there was a weird little property dialog one would get when right clicking on a project that had tabs showing the dependencies, and outputs, of each file in a project. I don't know how to get the equivalent report in VS2008 (or VS2010)
Chris Becke
+4  A: 

This happened to me today. I was able to track down the cause: The project included a header file which no longer existed on disk.

Removing the file from the project solved the problem.

Dave
No, I do not have any header files that are not existant on the disk.But how were you able to track down the cause? How did you find out that there was a missing file?Perhaps I can find out something more about my problem by checking in the same way like you.
Christoph Ungersböck
This happened to me. A co-worker was thrashing for hours trying to figure it out; I searched SO, found your answer, and 2 minutes later we were done!
Orion Edwards
thanks, that saved me a lot of time!
Steve
A: 

Has anyone figured this out yet?

I have the same problem with one of my solutions. One of the libraries is always re-linked.

I enabled the VS debugging as instructed in a bug report at Microsoft Connect.

Debug output has the following line:

Project 'D:...\XXX.vcxproj' not up to date because the build input 'D:...\YYY.EXE' was touched on 06/17/2010 13:04:10 which is after the last build finished on 06/17/2010 13:03:43.

Now, XXX.lib is a static library that is linked to YYY.EXE. Why does Visual Studio think that YYY.EXE is input to XXX.lib?

MM