From a9e54bb725e707c468b09e4ae6d3d15ce2129e70 Mon Sep 17 00:00:00 2001 From: Luther Monson Date: Wed, 20 May 2026 17:58:22 -0700 Subject: [PATCH] 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 --- src/StaticPHP/Util/System/WindowsUtil.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/StaticPHP/Util/System/WindowsUtil.php b/src/StaticPHP/Util/System/WindowsUtil.php index 40637262..3e17b4d2 100644 --- a/src/StaticPHP/Util/System/WindowsUtil.php +++ b/src/StaticPHP/Util/System/WindowsUtil.php @@ -54,6 +54,7 @@ class WindowsUtil } $args = [ '-latest', + '-products', '*', '-format', 'json', '-requires', 'Microsoft.VisualStudio.Component.VC.Tools.x86.x64', ];