Home Dashboard Directory Help
Search

Erroneous Windows SDK x64 Compilation Warning by claan719


Status: 

Closed
 as Fixed Help for as Fixed


4
0
Sign in
to vote
Type: Bug
ID: 713415
Opened: 12/12/2011 5:02:17 AM
Access Restriction: Public
Moderator Decision: Sent to Engineering Team for consideration
0
Workaround(s)
view
1
User(s) can reproduce this bug

Description

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
number. [C:\ToClas\CR-5022\MainCPU\CCPA1\MainCPU\ECAT\ECAT.vcxproj]

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.
Details
Sign in to post a comment.
Posted by claan719 on 1/9/2012 at 12:47 PM
Thanks Anton for your good support in this issue. I hope Microsoft will provide a real fix for it in future releases.
Posted by Microsoft on 1/3/2012 at 12:32 AM
Thanks for your feedback.
We are routing this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.
Posted by Anton V. Kravtsov on 12/27/2011 at 12:38 AM
I've solved the issue mentioned earlier (when building Win32-project on a PC without VS2010 installed).
I had to explicitly specify the Platform Toolset as
msbuild /p:PlatformToolset=Windows7.1SDK core.sln
See more details in http://stackoverflow.com/a/8642554/536172.
I hope it may help to resolve the original issue as well.
Posted by Anton V. Kravtsov on 12/26/2011 at 5:17 AM
Same issue occurs when building a x86 project in a 32-bit Windows XP for x32 platform using Windows SDK v7.1.

Project "E:\win\core.sln" on node 1 (default targets).
ValidateSolutionConfiguration:
Building solution configuration "Debug|Win32".
Project "E:\win\core.sln" (1) is building "E:\win\core_unittests.vcxproj" (2) on node 1 (default targets).
Project "E:\win\core_unittests.vcxproj" (2) is building "E:\cpptest\win\cpptest.vcxproj" (3) on node 1 (default targets).
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.Targets(847,9): warning MSB3644: The reference assemblies for framework ".NETFramework,Version=v4.0" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend. [E:\cpptest\win\cpptest.vcxproj]
C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(297,5): warning MSB8003: Could not find WindowsSDKDir variable from the registry. TargetFrameworkVersion or PlatformToolset may be set to an invalid version number. [E:\cpptest\win\cpptest.vcxproj]

This problem actually leads to the subsequent errors like
e:\cpptest\missing.cpp(36): fatal error C1083: Cannot open include file: 'windows.h': No such file or directory [E:\cpptest\win\cpptest.vcxproj]
Posted by DeanHiller on 12/22/2011 at 10:26 AM
In my case, have a C++ project that build with Visual Studio, setup a Windows SErver 2008 and NO Visual Studio and installed SDK 7.1 and then build the project with msbuild and our project.build file. Seems to happen with any C++ project. On my machine with Visual Studio, we have 0 errors/0 warnings but on windows server with sdk7.1 we have 1 error and 7 warnings including the one above.
Posted by Microsoft on 12/16/2011 at 12:55 AM
Hello,

Sorry for bothering. Is there any update?

It would be greatly appreciated if you could provide us with that information as quickly as possible.

Thanks you
Posted by MS-Moderator09 [Feedback Moderator] on 12/13/2011 at 12:49 AM
Thank you for reporting this issue. Unfortunately, we are unable to reproduce the issue with the steps you provided.

Could you please provide us with the following information?

1. Some more detail repro steps.
2. Does this issue occur with a specific project?
3. A sample project zip for further investigating.

It would be greatly appreciated if you could provide us this information as quickly as possible.

Thank you
Posted by MS-Moderator01 on 12/12/2011 at 5:40 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Sign in to post a workaround.