Ever seen this when converting Microsoft Visual 2008 projects to 2010 or 2012? I did, and it took me a while to figure why this worked in 2008, but not in the newer versions.
TargetPath(some-path-to-a-dll-or-a-exe-file) does not match the Linker's OutputFile property value (some-OTHER-path). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
In my large solution, the solution (pun intended :-P) was easy. There are two settings involved:
I have a Unix-like setup in my projects, where I have a bin, etc, src, data like directory layout. The bin directory has a debug and a release subdirectory, neatly separating all my binaries properly. So my linker output file was set to:
$(OutDir)..\..\..\bin\$(Configuration)\$(ProjectName).exeAnd my general output directory was set to the default:
This worked just fine in Visual Studio 2008. But starting from version 2010, Visual Studio wants your TargetPath setting to be the same as Linker's OutputFile setting. Don't ask me why, but it wants them to be equal.
My solution was pretty straightforward: change the output directory to be my bin\debug or bin\release directory, and reset the linker's output file to the default. Or in more general terms: remove any custom path information from your linker's output file setting, and in stead move it to your output path setting.
So my linker's output file setting became the default:
$(OutDir)$(TargetName)$(TargetExt)And my general output directory was set to:
..\..\bin\$(Configuration)\Hope this helps!