-
-
Notifications
You must be signed in to change notification settings - Fork 34.6k
Description
Version
main branch (and lower branches down to v20.x)
Platform
Microsoft Windows NT 10.0.26200.0 x64 (Windows 11 25H2)
Subsystem
build
What steps will reproduce the bug?
On Windows 11 25H2
Follow the instructions in https://docs.chocolatey.org/en-us/choco/uninstallation/ to uninstall any Chocolatey installation. Similarly, uninstall any Boxstarter installation in C:\ProgramData\Boxstarter and associated environment variables.
From Windows Settings > Apps > Installed Apps delete any of:
- Git
- Microsoft Visual Studio Installer
- Python & Python Installer
Delete:
C:\Python314C:\Program Files\NASM
Restart system
Open a Windows PowerShell (5.1) terminal window and execute the following commands taken from https://github.com/nodejs/node/blob/main/BUILDING.md#option-3-automated-install-with-boxstarter
Set-ExecutionPolicy Unrestricted -Force
iex ((New-Object System.Net.WebClient).DownloadString('https://boxstarter.org/bootstrapper.ps1'))
get-boxstarter -Force
Install-BoxstarterPackage https://raw.githubusercontent.com/nodejs/node/HEAD/tools/bootstrap/windows_boxstarter -DisableReboots
refreshenv
How often does it reproduce? Is there a required condition?
Hard error, always reproducible.
What is the expected behavior? Why is that the expected behavior?
It is expected that running the script as documented in BUILDING > Option 3: Automated install with Boxstarter will install:
- Git for Windows with the
gitand
Unix tools added to thePATH - Python 3.x
- Visual Studio 2022 Build Tools
with Visual C++ workload - NetWide Assembler
What do you see instead?
In logs:
Unhandled Exception: System.ArgumentException: --add
Opening Visual Studio Installer shows:
- Visual Studio Build Tools 2022 17.14.25 installed
- NO "Desktop development with C++" nor components that should have been installed:
Microsoft.VisualStudio.Component.VC.Tools.ARM64Microsoft.VisualStudio.Component.VC.ATL.ARM64Microsoft.NetCore.Component.SDKMicrosoft.VisualStudio.Component.VC.Llvm.ClangMicrosoft.VisualStudio.Component.VC.Llvm.ClangToolset
Logs show:
VERBOSE: Using a local installer executable: C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installer.exe
Installing visualstudio2022-workload-vctools...
Unhandled Exception: System.ArgumentException: --add
Parameter name: --add
at Microsoft.VisualStudio.Setup.Installer.CommandLine.CommandLineParser.HandleMultiInstanceOption(String option, IEnumerable`1 args)
at Microsoft.VisualStudio.Setup.Installer.CommandLine.CommandLineParser.MergeMultiInstanceOption(IEnumerable`1 args)
at Microsoft.VisualStudio.Setup.Installer.CommandLine.CommandLineParser.PreProcessArgs(IEnumerable`1 args, Boolean& finalizeInstall, Boolean& uninstallSelf)
at Microsoft.VisualStudio.Setup.Installer.CommandLine.CommandLineParser.Parse(IEnumerable`1 args)
at Microsoft.VisualStudio.Setup.Installer.Program.CreateParserResult(IServiceContainer services, String[] args)
at Microsoft.VisualStudio.Setup.Installer.Program.Main(String[] args)
[1a20:0001][2026-02-05T15:56:16] Releasing singleton lock.
The following are installed as shown by choco list:
Chocolatey v2.6.0
Boxstarter 3.0.3
Boxstarter.Bootstrapper 3.0.3
Boxstarter.Chocolatey 3.0.3
Boxstarter.Common 3.0.3
Boxstarter.HyperV 3.0.3
Boxstarter.WinConfig 3.0.3
chocolatey 2.6.0
chocolatey-compatibility.extension 1.0.0
chocolatey-core.extension 1.4.0
chocolatey-dotnetfx.extension 1.0.1
chocolatey-visualstudio.extension 1.13.0
chocolatey-windowsupdate.extension 1.0.5
dotnetfx 4.8.0.20220524
git 2.53.0
git.install 2.53.0
KB2919355 1.0.20160915
KB2919442 1.0.20160915
KB2999226 1.0.20181019
KB3033929 1.0.5
KB3035131 1.0.3
nasm 3.1.0
python3 3.14.3
python314 3.14.3
tmp582D.tmp 1.0.0
vcredist140 14.50.35719
vcredist2015 14.0.24215.20170201
visualstudio2022buildtools 117.14.24
visualstudio-installer 2.0.7
28 packages installed.
Boxstarter install failure.log
Additional information
The last release of chocolatey/boxstarter was 3.0.3 in Oct 6, 2023. It is bundled with choco@1.1.0, not the current chocolatey@2.6.0.
If the following failing command is run directly in choco rather than through Boxstarter, it works, so it looks like there is a compatibility issue with Boxstarter:
choco install visualstudio2022-workload-vctools -y --params="--add Microsoft.VisualStudio.Component.VC.Tools.ARM64 --add Microsoft.VisualStudio.Component.VC.ATL.ARM64 --add Microsoft.NetCore.Component.SDK --add Microsoft.VisualStudio.Component.VC.Llvm.Clang --add Microsoft.VisualStudio.Component.VC.Llvm.ClangToolset"Also Boxstarter is only compatible with the legacy Windows PowerShell 5, not with PowerShell 7 (see issue chocolatey/boxstarter#353 from Oct 2018).