The macro $(WindowsSDK_IncludePath) has the values shown in the picture.
I'd like to know where those values are defined, they must be defined in some files.
The picture was taken from Visual Studio 2013.
The macro $(WindowsSDK_IncludePath) has the values shown in the picture.
I'd like to know where those values are defined, they must be defined in some files.
The picture was taken from Visual Studio 2013.
In my case, the WindowsSDK_IncludePath
variable was correctly defined and in fact it worked perfectly in Visual Studio 2013. So I even uninstalled and reinstalled VS2015. Then I found thanks to this link that the preset macro variables can be modified by specific user settings. These user settings are stored in C:\Users\<user>\AppData\Local\Microsoft\MSBuild\v4.0\Microsoft.Cpp.Win32.user.props
which in my case read as follows:
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets">
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<IncludePath>$(VC_IncludePath);$(WindowsSDK_IncludePath);C:\Program Files (x86)\CodeSynthesis XSD 4.0\include;</IncludePath>
<LibraryPath>$(VC_LibraryPath_x86);$(WindowsSDK_LibraryPath_x86);C:\Program Files (x86)\CodeSynthesis XSD 4.0\lib\vc-12.0;</LibraryPath>
<ExecutablePath>C:\Program Files (x86)\CodeSynthesis XSD 4.0\bin;$(VC_ExecutablePath_x86);$(WindowsSDK_ExecutablePath);$(VS_ExecutablePath);$(MSBuild_ExecutablePath);$(SystemRoot)\SysWow64;$(FxCopDir);$(PATH);</ExecutablePath>
</PropertyGroup>
<ItemDefinitionGroup />
<ItemGroup />
</Project>
Somehow the <IncludePath>
sentence made it impossible for VS2015 to find the correct value. In my laptop computer where everything worked correctly, the file was basically empty:
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets">
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
</PropertyGroup>
<ItemDefinitionGroup />
<ItemGroup />
</Project>
After setting my file just like the one in my laptop, everything worked normally. Of course I lost the execution preference of CodeSynthesis XSD but right now I am not working on any project that use it. I will continue experimenting with different variants of this file.
For me it was the file Microsoft.Cpp.Common.props
in folder C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140
, where I had to change the hardcoded Windows 10 SDK version from 10.0.10240.0 to 10.0.10586.0.
<!-- 10.0.10240.0 is the hardcoded checked-in version of uCRT that we use in case we target 8.1 SDK -->
<TargetUniversalCRTVersion Condition="'$(TargetUniversalCRTVersion)' == '' and ('$(TargetPlatformVersion)' == '8.1' or '$(DefineWindowsSDK_71A)' == 'true')">10.0.10586.0</TargetUniversalCRTVersion>
I'm using VS2015 on Windows 10 and wasn't able to compile against Windows 8.1 SDK because of missing include files. Installing the standalone Windows 10 SDK didn't help either (because it doesn't contain ucrt files for 10.0.10240 like ctype.h a.s.o.).
I see the data in file sdk.props
in folder C:\Program Files (x86)\Windows Kits\8.0\build\CommonConfiguration\Neutral
<PropertyGroup>
<WindowsSdkDir Condition="'$(WindowsSdkDir)' == ''">$([MSBUILD]::GetDirectoryNameOfFileAbove('$(MSBUILDTHISFILEDIRECTORY)', 'sdkmanifest.xml'))</WindowsSdkDir>
</PropertyGroup>
<PropertyGroup> <WindowsSDK_IncludePath>$(WindowsSdkDir)Include\um;$(WindowsSdkDir)Include\shared;$(WindowsSdkDir)Include\winrt;</WindowsSDK_IncludePath>
</PropertyGroup>
I use a Win8 + VS2012, so it should be in folder 8.1 for your VS2013 + 8.1 SDK.
I find Reason that : Windows Registry
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Kits\Installed Roots]
"KitsRoot10"="C:\\Program Files\\Windows Kits\\10\\"
but in Actually
"KitsRoot10"="C:\\Program Files (x86)\\Windows Kits\\10\\"
"AppVerifier64BitAutomationRoot"="C:\\Program Files\\Application Verifier\\"
"KitsRoot81"="C:\\Program Files (x86)\\Windows Kits\\8.1\\"
Search for *.props in C:\Program Files (x86)\Windows Kits\
In my case the file causing the problem was UAP.props. Editing the file and changing 4.7.1 to 4.6.1 solved the issue.
<PropertyGroup>
<WindowsSdkDir Condition="'$(WindowsSdkDir)' == ''">$([MSBUILD]::GetDirectoryNameOfFileAbove('$(MSBUILDTHISFILEDIRECTORY)', 'sdkmanifest.xml'))\</WindowsSdkDir>
<DotNetSdkRoot Condition="'$(DotNetSdkRoot)' == ''">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\NETFXSDK\4.7.1@KitsInstallationFolder)</DotNetSdkRoot>
<DotNetSdkRoot Condition="'$(DotNetSdkRoot)' == ''">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\NETFXSDK\4.7.1@KitsInstallationFolder)</DotNetSdkRoot>
</PropertyGroup>