From 16f692b815d3b60169dd27f83ee2a83eb6f9fc17 Mon Sep 17 00:00:00 2001 From: Matthew John Cheetham Date: Wed, 10 Sep 2025 09:59:26 +0100 Subject: [PATCH 1/2] Directory.Build.props: set minimum Windows API version Enforce a minimum Windows API version of build 16299 (aka '1709', aka 'Redstone 3', aka 'Fall Creators Update'). This was the previous target SDK version before 240f73ee5 changed the native projects to use the latest Windows SDK installed. Setting the TargetPlatformMinVersion property for the native projects will prevent use of APIs newer that the specified version, with newer Windows SDKs. Signed-off-by: Matthew John Cheetham --- Directory.Build.props | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Directory.Build.props b/Directory.Build.props index 61e42400d..76c51bce4 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -34,6 +34,15 @@ $(ProjectOutPath)bin\$(Platform)\$(Configuration)\ $(ProjectOutPath)intermediate\$(Platform)\$(Configuration)\ $(IntDir)include\ + + 10.0.16299.0 From b14c5a2d25e42eb1757667a9e00f8c1f823192d9 Mon Sep 17 00:00:00 2001 From: Matthew John Cheetham Date: Wed, 10 Sep 2025 10:02:44 +0100 Subject: [PATCH 2/2] Build.bat: loosen Windows SDK checks Since we now build with the latest installed Windows SDKs (whilst still enforcing a minimum API compatibility), we can delete this check for a specific Windows SDK installation. Signed-off-by: Matthew John Cheetham --- scripts/Build.bat | 6 ------ 1 file changed, 6 deletions(-) diff --git a/scripts/Build.bat b/scripts/Build.bat index cf8ebefd1..e51c8ebe8 100644 --- a/scripts/Build.bat +++ b/scripts/Build.bat @@ -46,12 +46,6 @@ SET VSWHERE_VER=2.6.7 "%NUGET_EXEC%" install vswhere -Version %VSWHERE_VER% -OutputDirectory %VFS_PACKAGESDIR% || exit /b 1 SET VSWHERE_EXEC="%VFS_PACKAGESDIR%\vswhere.%VSWHERE_VER%\tools\vswhere.exe" -REM Assumes default installation location for Windows 10 SDKs -IF NOT EXIST "C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0" ( - ECHO ERROR: Could not find Windows 10 SDK Version 16299 - EXIT /B 1 -) - REM Use vswhere to find the latest VS installation with the MSBuild component REM See https://github.com/Microsoft/vswhere/wiki/Find-MSBuild FOR /F "tokens=* USEBACKQ" %%F IN (`%VSWHERE_EXEC% -all -prerelease -latest -products * -requires Microsoft.Component.MSBuild -find MSBuild\**\Bin\amd64\MSBuild.exe`) DO (