msbuild was complaining that with warning MSB8012 that |TargetPath| does not match the Linker's OutputFile property value. The problem was caused by the wrong ordering of the setting of build properties and the inclusion of the built-in property sheets.