Skip to content

Commit 456d6d9

Browse files
bpo-45220: Avoid automatically selecting the Windows 11 SDK preview when building (GH-28393) (GH-28622)
(cherry picked from commit f4b94b1) Co-authored-by: Steve Dower <[email protected]>
1 parent 8344fef commit 456d6d9

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Avoid building with the Windows 11 SDK previews automatically. This may be
2+
overridden by setting the ``DefaultWindowsSDKVersion`` environment variable
3+
before building.

PCbuild/python.props

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,9 @@
106106
<!-- Sometimes the version in the registry has to .0 suffix, and sometimes it doesn't. Check and add it -->
107107
<_RegistryVersion Condition="$(_RegistryVersion) != '' and !$(_RegistryVersion.EndsWith('.0'))">$(_RegistryVersion).0</_RegistryVersion>
108108

109+
<!-- Avoid upgrading to Windows 11 SDK for now, but assume the latest Win10 SDK is installed -->
110+
<_RegistryVersion Condition="$([System.Version]::Parse($(_RegistryVersion))) >= $([System.Version]::Parse(`10.0.22000.0`))">10.0.19041.0</_RegistryVersion>
111+
109112
<!-- The minimum allowed SDK version to use for building -->
110113
<DefaultWindowsSDKVersion>10.0.10586.0</DefaultWindowsSDKVersion>
111114
<DefaultWindowsSDKVersion Condition="$([System.Version]::Parse($(_RegistryVersion))) > $([System.Version]::Parse($(DefaultWindowsSDKVersion)))">$(_RegistryVersion)</DefaultWindowsSDKVersion>

0 commit comments

Comments
 (0)