We have a fairly large solution and while working with one of its projects (a test dll) I noticed something unusual. If I issue a "Rebuild Solution" or "Rebuild ProjectX" then Project X builds just fine. However, if I then make a change to a file in ProjectX or issue a "Rebuild Only ProjectX" then I get lots of unresolved symbols.
Our temporary work around is to add references to the required library in ProjectX's Linker Additional Dependencies. However, that doesn't feel right.
Making the situation even a little more strange is that when I look at the map file after doing a RebuildAll (and without the Additional Dependencies specified) Ido NOT see the symbols that are called out as unresolved when rebuilding just ProjectX. And if I look at the map file created when rebuilding just ProjectX (and with the Additional Dependencies specified) IDO see those symbols and the resulting dll is much larger. This seems to imply that when doing a rebuild of more than just ProjectX it is able to correctly determine that the symbols in question are really not needed and therefore not linked in. But when linking or rebuilding only ProjectX it can't make that determination.
So why the different behavior? I am working with VS 2010 SP1. I have looked at thinks like "Whole Program Optimization" but this is turned off.
Oh, this only seems to happen with a Release configuration, not Debug.