From ab0d5cdd782f36c2fb6368b856f63f778dcd2f5e Mon Sep 17 00:00:00 2001 From: Dylan Conway Date: Wed, 4 Feb 2026 20:36:37 -0800 Subject: [PATCH] fix vs-shell.ps1: HostArch only accepts x86/amd64, not arm64 --- scripts/vs-shell.ps1 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/vs-shell.ps1 b/scripts/vs-shell.ps1 index 03cc37688d..3537fcc5ca 100755 --- a/scripts/vs-shell.ps1 +++ b/scripts/vs-shell.ps1 @@ -36,7 +36,9 @@ if($env:VSINSTALLDIR -eq $null) { Push-Location $vsDir try { $vsShell = (Join-Path -Path $vsDir -ChildPath "Common7\Tools\Launch-VsDevShell.ps1") - . $vsShell -Arch $script:VsArch -HostArch $script:VsArch + # -HostArch only accepts "x86" or "amd64" — even on native ARM64, use "amd64" + $hostArch = if ($script:VsArch -eq "arm64") { "amd64" } else { $script:VsArch } + . $vsShell -Arch $script:VsArch -HostArch $hostArch } finally { Pop-Location }