Skip to content

ci(windows): fix Build windows by locating vcvars64.bat via vswhere (windows-2025-vs2026)#463

Merged
SciLor merged 1 commit into
toniebox-reverse-engineering:developfrom
aflores-qb:fix/windows-vcvars-vswhere
Jun 18, 2026
Merged

ci(windows): fix Build windows by locating vcvars64.bat via vswhere (windows-2025-vs2026)#463
SciLor merged 1 commit into
toniebox-reverse-engineering:developfrom
aflores-qb:fix/windows-vcvars-vswhere

Conversation

@aflores-qb

Copy link
Copy Markdown

Problem

The build-windows-amd64 job in build_release.yml hardcodes the Visual Studio install path:

C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat

GitHub is migrating the windows-latest runner image to windows-2025-vs2026 (runner notice: "windows-latest requests are being redirected to windows-2025-vs2026 by June 15, 2026"). The new image no longer has the 2022\Enterprise\ path, so the Build windows step fails instantly with:

The system cannot find the path specified.
##[error]Process completed with exit code 1.

This is environmental and breaks every PR plus develop itself — confirmed failing on develop (2026-06-13), #461 (2026-06-14), and #462 (2026-06-16), all at the same step.

Fix

Resolve the active Visual Studio installation dynamically with vswhere.exe (always present at the fixed Installer location) and call its vcvars64.bat. This is version/edition-agnostic and keeps the existing make-based build unchanged.

for /f "usebackq delims=" %%i in (`"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath`) do set "VSINSTALL=%%i"
if not defined VSINSTALL ( echo Could not locate Visual Studio via vswhere & exit /b 1 )
call "%VSINSTALL%\VC\Auxiliary\Build\vcvars64.bat" && make build PLATFORM=windows SHELL_ENV=bash

microsoft/setup-msbuild was considered but is insufficient here: it only adds MSBuild to PATH and does not set up the cl.exe/C++ toolchain environment that the make build requires.

Impact

Unblocks the Windows build for all open PRs (#461, #462) and future ones. No code changes — CI workflow only.

🤖 Generated with Claude Code

…path

The build-windows-amd64 job hardcoded the Visual Studio install path
(2022\Enterprise). GitHub is migrating the windows-latest runner image to
windows-2025-vs2026, which no longer has that path, so the "Build windows"
step fails immediately with "The system cannot find the path specified."
This currently breaks every PR and the develop branch.

Use vswhere.exe (always present at the fixed Installer location) to resolve
the active VS installation dynamically and call its vcvars64.bat. This works
across VS versions/editions and keeps the existing make-based build intact.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@SciLor SciLor merged commit b0697bf into toniebox-reverse-engineering:develop Jun 18, 2026
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants