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
This commit is contained in:
Luther Monson
2026-05-20 17:58:22 -07:00
parent 3f7bad75ec
commit a9e54bb725

View File

@@ -54,6 +54,7 @@ class WindowsUtil
}
$args = [
'-latest',
'-products', '*',
'-format', 'json',
'-requires', 'Microsoft.VisualStudio.Component.VC.Tools.x86.x64',
];