How do I fix warning MSB8012 in a static library project in Visual C++ 2010?

The build system was dramatically overhauled in VS2010, it now uses MSBuild instead of the custom VCBuild system. The same build system used by other languages supported by VS. They did a pretty good job of making that invisible, old projects normally build just fine. But there are a few places where you can get in trouble when you import old projects. Which is what this warning is saying.

Using the linker's General + Output File setting to name the output file is one such troublespot. Not actually that sure what can go wrong, it probably has something to do with dependency checking. The default setting for it is $(OutDir)$(TargetName)$(TargetExt). The best way to rename the output file is therefore to change the $(TargetName) macro value.

Which is available on the main General page as the "Target Name" setting. It didn't exist in earlier VS versions. So change that one to "itk32d". Or better, $(ProjectName)d. And reset the linker setting.


I had this problem but could not find a valid answer here in SO, eventually I found out that it was solved by fixing the Intermediate Directory from ".\Debug" to "..\Debug", and ".\Release" to "..\Release" in each build configuration.

I'm sorry this is only worth for a comment but I don't have enough points to add comments to other people's posts.