fix(build): pass -prerelease to vswhere (find VS2026)

VS2026 ships on the prerelease channel; vswhere omits it unless
-prerelease is given. Without it _find_msbuild_via_vswhere returned
nothing, so the path fallback picked an incomplete
(x86)\Microsoft Visual Studio\18\BuildTools install (MSBuild present
but no VC v180 targets) -> MSB4019 on hosts that have VS2026 IDE but
not BuildTools. -prerelease is harmless on the CI VM (BuildTools is
found regardless).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-05-17 21:57:13 +02:00
parent ea71e0d8b2
commit b052497701
7 changed files with 7 additions and 0 deletions
+1
View File
@@ -141,6 +141,7 @@ def _find_msbuild_via_vswhere(vs_version: str) -> 'Optional[Tuple[Path, str, str
str(_VSWHERE_PATH),
'-version', _VS_VERSION_RANGE[ver],
'-latest',
'-prerelease',
'-requires', 'Microsoft.Component.MSBuild',
'-find', r'MSBuild\**\Bin\MSBuild.exe',
],