Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VS2010 always relinks the project

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 refereshing one C++/CLI assembly. It doesn't recompile anything, but the linker touches the file. The causes a ripple effect downstream in the build as a whole bunch of dependent then get rebuilt.

Any ideas on how to find out why it thinks it needs to relink the file? I've turned on verbose build logging, but nothing stands out.

like image 502
Rob Walker Avatar asked Apr 14 '10 19:04

Rob Walker


1 Answers

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.

like image 54
Rob Walker Avatar answered Oct 03 '22 03:10

Rob Walker