[windows] Add windows-11-arm64 image generation code (#13879)

This commit is contained in:
Shamil Mubarakshin
2026-04-07 17:32:00 +02:00
committed by GitHub
parent c722443db7
commit 1b60920cc9
60 changed files with 1744 additions and 179 deletions
@@ -4,6 +4,12 @@
################################################################################
$vsToolset = (Get-ToolsetContent).visualStudio
if (Test-IsArm64) {
$vsArch = "arm64"
} else {
$vsArch = "x64"
}
# Install Visual Studio for Windows 22 and 25 with InstallChannel
Install-VisualStudio `
-Version $vsToolset.subversion `
@@ -11,7 +17,8 @@ Install-VisualStudio `
-Channel $vsToolset.channel `
-InstallChannelUri $vsToolset.installChannelUri `
-RequiredComponents $vsToolset.workloads `
-ExtraArgs "--allWorkloads --includeRecommended --remove Component.CPython3.x64"
-ExtraArgs "--allWorkloads --includeRecommended --remove Component.CPython3.x64" `
-Architecture $vsArch
# Find the version of VS installed for this instance
# Only supports a single instance
@@ -27,7 +34,7 @@ $vsInstallRoot = (Get-VisualStudioInstance).InstallationPath
$newContent = '{"Extensions":[{"Key":"1e906ff5-9da8-4091-a299-5c253c55fdc9","Value":{"ShouldAutoUpdate":false}},{"Key":"Microsoft.VisualStudio.Web.AzureFunctions","Value":{"ShouldAutoUpdate":false}}],"ShouldAutoUpdate":false,"ShouldCheckForUpdates":false}'
Set-Content -Path "$vsInstallRoot\Common7\IDE\Extensions\MachineState.json" -Value $newContent
if (Test-IsWin22) {
if (Test-IsWin22-X64) {
# Install Windows 10 SDK version 10.0.17763
Install-Binary -Type EXE `
-Url 'https://go.microsoft.com/fwlink/p/?LinkID=2033908' `
@@ -42,7 +49,7 @@ Install-Binary -Type EXE `
-ExpectedSubject $(Get-MicrosoftPublisher)
# Enable Windows Desktop Debuggers (cdb.exe) on Windows Server 2025
if (Test-IsWin25) {
if (Test-IsWin25-X64) {
$installerEntry = Get-ItemProperty HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\* `
| Where-Object { $_.DisplayName -match "Windows Software Development Kit" } `
| Sort-Object DisplayVersion -Descending | Select-Object -First 1