Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get the windows kits root from the registry value "HKLM\SOFTWARE\Microsoft\Windows Kits\Installed Roots" @KitsRoot10 #8745

Merged
merged 6 commits into from Apr 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/MSBuild/app.amd64.config
Expand Up @@ -242,6 +242,8 @@
<property name="VSToolsPath" value="$(MSBuildProgramFiles32)\MSBuild\Microsoft\VisualStudio\v$(VisualStudioVersion)"/>
</searchPaths>
</projectImportSearchPaths>

<property name="WindowsKitsRoot" value="$([MSBuild]::GetRegistryValueFromView('HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Kits\Installed Roots', 'KitsRoot10', null, RegistryView.Registry32, RegistryView.Default))" />
rainersigwald marked this conversation as resolved.
Show resolved Hide resolved
</toolset>
</msbuildToolsets>
</configuration>
2 changes: 2 additions & 0 deletions src/MSBuild/app.config
Expand Up @@ -191,6 +191,8 @@
<property name="VSToolsPath" value="$(MSBuildProgramFiles32)\MSBuild\Microsoft\VisualStudio\v$(VisualStudioVersion)"/>
</searchPaths>
</projectImportSearchPaths>

<property name="WindowsKitsRoot" value="$([MSBuild]::GetRegistryValueFromView('HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Kits\Installed Roots', 'KitsRoot10', null, RegistryView.Registry32, RegistryView.Default))" />
</toolset>
</msbuildToolsets>
</configuration>
6 changes: 3 additions & 3 deletions src/Tasks/Microsoft.Common.CurrentVersion.targets
Expand Up @@ -385,7 +385,7 @@ Copyright (C) Microsoft Corporation. All rights reserved.
<PropertyGroup>
<_GenerateBindingRedirectsIntermediateAppConfig>$(IntermediateOutputPath)$(TargetFileName).config</_GenerateBindingRedirectsIntermediateAppConfig>
</PropertyGroup>

<PropertyGroup Condition="'$(MSBuildCopyMarkerName)' == ''">
<MSBuildCopyMarkerName>$(MSBuildProjectFile)</MSBuildCopyMarkerName>
<!-- For a long MSBuildProjectFile let's shorten this to 17 chars - using the first 8 chars of the filename and a filename hash. -->
Expand Down Expand Up @@ -2566,7 +2566,7 @@ Copyright (C) Microsoft Corporation. All rights reserved.
<SDKReferenceRegistryRoot Condition="'$(SDKReferenceRegistryRoot)' == ''">Software\Microsoft\Microsoft SDKs</SDKReferenceRegistryRoot>
<SDKReferenceDirectoryRoot Condition="'$(SDKReferenceDirectoryRoot)' == ''">$(LocalAppData)\Microsoft SDKs;$(MSBuildProgramFiles32)\Microsoft SDKs</SDKReferenceDirectoryRoot>
<!-- Manifest driven extension SDK locations -->
<SDKExtensionDirectoryRoot Condition="'$(SDKExtensionDirectoryRoot)' == '' and '$(SDKIdentifier)' != ''">$(MSBuildProgramFiles32)\Microsoft SDKs\Windows Kits\10;$(MSBuildProgramFiles32)\Windows Kits\10</SDKExtensionDirectoryRoot>
<SDKExtensionDirectoryRoot Condition="'$(SDKExtensionDirectoryRoot)' == '' and '$(SDKIdentifier)' != ''">$(MSBuildProgramFiles32)\Microsoft SDKs\Windows Kits\10;$(WindowsKitsRoot)</SDKExtensionDirectoryRoot>

<!-- UAP projects by default should support Windows 8.1 SDKs -->
<SupportWindows81SDKs Condition="'$(SupportWindows81SDKs)' == '' and '$(Support81SDKs)' != 'false' and '$(TargetPlatformIdentifier)' == 'UAP'">true</SupportWindows81SDKs>
Expand Down Expand Up @@ -6800,7 +6800,7 @@ Copyright (C) Microsoft Corporation. All rights reserved.
</PropertyGroup>

<Import Project="$(MsTestToolsTargets)" Condition="Exists('$(MsTestToolsTargets)')" />

<PropertyGroup>
<UseMSBuildTestInfrastructure Condition="'$(UseMSBuildTestInfrastructure)' == ''">false</UseMSBuildTestInfrastructure>
</PropertyGroup>
Expand Down