I am migrating a complex mixed C++/.NET solution from VS2008 to VS2010.
The upgraded solution works in VS2010, but the build system is always refere
Turns out the problem was that the PDB filename was defined under both the compiler settings and the linker settings (with the same name).
This seemed to cause a problem in VS2010 as somehow an 'old' pdb from the intermediate directory (compiler output?) was being copied over the one in the output directory (linker output?). This resulted in the pdb in the output directory being older than some of the obj files and forcing the relink next time around (rinse and repeat).
Clearing the pdb name settings seemed to fix the problem, and the defaults were fine.
I'm just adding this for the record, in case anyone else gets this problem in the future.
We had a similar problem with a large, mixed FORTRAN/C++ project relinking whether or not anything had changed. It seems to have started when the solution was upgraded from VS2008 to 2010, although no-one could quite remember.
Eventually, I took a serious look at it (it was annoying, but not enough to do anything). By process of elimination, I have found the solution:
Remove any quotes in the "Additional Library Directories" of the top-level FORTRAN project (i.e. the one that makes the executable).
Now, I wouldn't believe this myself without evidence, so if you have the urge to reproduce this error yourself:
This only appears to be a problem on the top-level project, and when those projects are FORTRAN - the quotes have no effect on C++ projects or those that create libs.
The relinking does not occur if VS does not need to search for libs (for example, if all of your libs are inbuilt, like kernel32.lib), but will occur whether or not your lib is in the directory which has quotes or a different one.
If anyone can justify this "feature", please let me know!