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:
@@ -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',
|
||||
],
|
||||
|
||||
@@ -150,6 +150,7 @@ def _find_msbuild_via_vswhere(vs_version: str) -> 'Optional[Tuple[Path, str, str
|
||||
'-products', '*',
|
||||
'-version', _VS_VERSION_RANGE[ver],
|
||||
'-latest',
|
||||
'-prerelease',
|
||||
'-requires', 'Microsoft.Component.MSBuild',
|
||||
'-find', r'MSBuild\**\Bin\MSBuild.exe',
|
||||
],
|
||||
|
||||
@@ -150,6 +150,7 @@ def _find_msbuild_via_vswhere(vs_version: str) -> 'Optional[Tuple[Path, str, str
|
||||
'-products', '*',
|
||||
'-version', _VS_VERSION_RANGE[ver],
|
||||
'-latest',
|
||||
'-prerelease',
|
||||
'-requires', 'Microsoft.Component.MSBuild',
|
||||
'-find', r'MSBuild\**\Bin\MSBuild.exe',
|
||||
],
|
||||
|
||||
@@ -150,6 +150,7 @@ def _find_msbuild_via_vswhere(vs_version: str) -> 'Optional[Tuple[Path, str, str
|
||||
'-products', '*',
|
||||
'-version', _VS_VERSION_RANGE[ver],
|
||||
'-latest',
|
||||
'-prerelease',
|
||||
'-requires', 'Microsoft.Component.MSBuild',
|
||||
'-find', r'MSBuild\**\Bin\MSBuild.exe',
|
||||
],
|
||||
|
||||
@@ -146,6 +146,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',
|
||||
],
|
||||
|
||||
@@ -150,6 +150,7 @@ def _find_msbuild_via_vswhere(vs_version: str) -> 'Optional[Tuple[Path, str, str
|
||||
'-products', '*',
|
||||
'-version', _VS_VERSION_RANGE[ver],
|
||||
'-latest',
|
||||
'-prerelease',
|
||||
'-requires', 'Microsoft.Component.MSBuild',
|
||||
'-find', r'MSBuild\**\Bin\MSBuild.exe',
|
||||
],
|
||||
|
||||
@@ -150,6 +150,7 @@ def _find_msbuild_via_vswhere(vs_version: str) -> 'Optional[Tuple[Path, str, str
|
||||
'-products', '*',
|
||||
'-version', _VS_VERSION_RANGE[ver],
|
||||
'-latest',
|
||||
'-prerelease',
|
||||
'-requires', 'Microsoft.Component.MSBuild',
|
||||
'-find', r'MSBuild\**\Bin\MSBuild.exe',
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user