Skip to content

Commit a9e54bb

Browse files
committed
fix(windows): add -products * to vswhere so Build Tools are found
vswhere.exe defaults to searching Community, Professional, and Enterprise editions only. CI environments typically install the lightweight Build Tools product which is a separate product type (Microsoft.VisualStudio.Product.BuildTools). Without -products * the tool returns no results and the build fails with "Visual Studio with C++ tools not found". See: https://github.com/microsoft/vswhere/wiki/Find-MSBuild
1 parent 3f7bad7 commit a9e54bb

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/StaticPHP/Util/System/WindowsUtil.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ public static function findVisualStudio(): array|false
5454
}
5555
$args = [
5656
'-latest',
57+
'-products', '*',
5758
'-format', 'json',
5859
'-requires', 'Microsoft.VisualStudio.Component.VC.Tools.x86.x64',
5960
];

0 commit comments

Comments
 (0)