From 44b2392233b366c8573f259a80a002da9541d90b Mon Sep 17 00:00:00 2001 From: mark roddy Date: Mon, 31 Aug 2026 16:40:31 -0400 Subject: [PATCH 1/3] support VS2026 --- build.ps1 | 20 ++++++++++++++++---- buildFuncs.psm1 | 6 ++++++ wdkEnv.ps1 | 2 +- 3 files changed, 23 insertions(+), 5 deletions(-) diff --git a/build.ps1 b/build.ps1 index 9d13537..910bc8e 100644 --- a/build.ps1 +++ b/build.ps1 @@ -16,7 +16,7 @@ param( Specify one of "EWDK","VS2022","VS2019","VS2017","VS2015". Default EWDK. #> - [ValidateSet("EWDK","VS2022","VS2019","VS2017","VS2015")] + [ValidateSet("EWDK","VS2026","VS2022","VS2019","VS2017","VS2015")] [string]$toolset="EWDK", # the directory where the msbuild project file to be built is located [Parameter(ValueFromPipeline)] @@ -53,7 +53,7 @@ $ErrorActionPreference = 'Stop' $root = $PSScriptRoot $buildModule = "$root\buildFuncs.psm1" -Import-Module -Name $buildModule +Import-Module -Name $buildModule -Force try { @@ -147,10 +147,22 @@ try } if ("$($platforms[0])" -eq "all") { - $platforms = @("x86", "x64") + $platforms = @() $match = Get-Content "$projectPath\$projectName" | Select-String -Pattern '|Win32' -SimpleMatch if ($match) { - $platforms = @("Win32", "x64") + $platforms += "Win32" + } + $match = Get-Content "$projectPath\$projectName" | Select-String -Pattern '|x86' -SimpleMatch + if ($match) { + $platforms += "x86" + } + $match = Get-Content "$projectPath\$projectName" | Select-String -Pattern '|x64' -SimpleMatch + if ($match) { + $platforms += "x64" + } + $match = Get-Content "$projectPath\$projectName" | Select-String -Pattern '|ARM64' -SimpleMatch + if ($match) { + $platforms += "ARM64" } } diff --git a/buildFuncs.psm1 b/buildFuncs.psm1 index a8796b2..19194eb 100644 --- a/buildFuncs.psm1 +++ b/buildFuncs.psm1 @@ -342,6 +342,12 @@ function getVsCmdScripts } } } + 'VS2026' { + $defaultProfessionalToolsPath = "${env:ProgramFiles}\Microsoft Visual Studio\18\Professional\Common7\Tools" + $defaultEnterpriseToolsPath = "${env:ProgramFiles}\Microsoft Visual Studio\18\Enterprise\Common7\Tools" + $defaultCommunityToolsPath = "${env:ProgramFiles}\Microsoft Visual Studio\18\Community\Common7\Tools" + $batName = @("vsdevcmd.bat") + } 'VS2022' { $defaultProfessionalToolsPath = "${env:ProgramFiles}\Microsoft Visual Studio\2022\Professional\Common7\Tools" $defaultEnterpriseToolsPath = "${env:ProgramFiles}\Microsoft Visual Studio\2022\Enterprise\Common7\Tools" diff --git a/wdkEnv.ps1 b/wdkEnv.ps1 index 0a681d3..3b75d07 100644 --- a/wdkEnv.ps1 +++ b/wdkEnv.ps1 @@ -1,5 +1,5 @@ param( - [ValidateSet("EWDK","VS2022","VS2019","VS2017","VS2015")] + [ValidateSet("EWDK","VS2026","VS2022","VS2019","VS2017","VS2015")] [string]$toolset="EWDK", [switch] $noSession ) From eb1289e55a2e8cf1b55e3fbdc3b0a9de3496912e Mon Sep 17 00:00:00 2001 From: mark roddy Date: Mon, 31 Aug 2026 16:53:04 -0400 Subject: [PATCH 2/3] update build.json to VS2026 --- tests/buildtest/build.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/buildtest/build.json b/tests/buildtest/build.json index 7b267fa..90caeba 100644 --- a/tests/buildtest/build.json +++ b/tests/buildtest/build.json @@ -1,5 +1,5 @@ { - "toolset" : "VS2022", + "toolset" : "VS2026", "projectRootPath" : "./buildtest", "htsToolsPath" : "../", "projectPath" : "./buildtest/driver" From c54241113bbea3db726bf7ae18e9cf91fe588d96 Mon Sep 17 00:00:00 2001 From: mark roddy Date: Tue, 1 Sep 2026 11:11:33 -0400 Subject: [PATCH 3/3] github windows latest requires nuget for WDK. --- .gitignore | 1 + tests/buildtest/driver/directory.build.props | 18 ++++++++++++++++++ tests/buildtest/driver/packages.config | 8 ++++++++ tests/test1.ps1 | 2 ++ 4 files changed, 29 insertions(+) create mode 100644 tests/buildtest/driver/directory.build.props create mode 100644 tests/buildtest/driver/packages.config diff --git a/.gitignore b/.gitignore index 00fed1b..48023f3 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,5 @@ tests/buildtest/bin/ tests/buildtest/inc/ tests/buildtest/logs/ tests/buildtest/driver/x64 +tests/buildtest/driver/packages diff --git a/tests/buildtest/driver/directory.build.props b/tests/buildtest/driver/directory.build.props new file mode 100644 index 0000000..68ade2f --- /dev/null +++ b/tests/buildtest/driver/directory.build.props @@ -0,0 +1,18 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/buildtest/driver/packages.config b/tests/buildtest/driver/packages.config new file mode 100644 index 0000000..90edacf --- /dev/null +++ b/tests/buildtest/driver/packages.config @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/tests/test1.ps1 b/tests/test1.ps1 index 3cc1af5..5c3742a 100644 --- a/tests/test1.ps1 +++ b/tests/test1.ps1 @@ -33,6 +33,8 @@ try { Remove-Item -recurse -path $p -force } } + # restore nuget packages (required for github) + nuget restore .\buildtest\driver\packages.config -PackagesDirectory .\buildtest\driver\packages\ ../build.ps1 -jsonfile "$root/buildtest/build.json" if ($LASTEXITCODE -ne 0) { write-error "Build exit code $LASTEXITCODE "