When building a x86 project for an x64 platform using Windows SDK v7.1 the following erroneous warning is presented:
"Cxyz.vcxproj" (rebuild target) (1
(PrepareForBuild target) ->
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(
297,5): warning MSB8003: Could not find WindowsSDKDir variable from the registr
y. TargetFrameworkVersion or PlatformToolset may be set to an invalid version
The environment is setup by calling "SetEnv.cmd /x86". It seems like it's the x86 switch that generates the problem. When setting up the environment on a x86 platform with the corresponding command the warning message appears as well. On the other hand, if the x86 directive is removed for the x86 platform, the program builds just fine.
The program builds for the x64 platform as well, but the warning is not acceptable since our customers build and deploy the source code themselves.