Skip to content

Commit d0bf7bb

Browse files
committed
fix(msvc): well-known-paths fallback covers major-version VS directories
windows-latest now installs VS under 'Microsoft Visual Studio\18\Enterprise' (major version, not year branding) — vswhere finds it, but the strategy-3 path scan should too.
1 parent 7d7538b commit d0bf7bb

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/toolchain/msvc.cppm

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,10 @@ std::optional<std::filesystem::path> find_vs_via_paths() {
141141
"C:\\Program Files\\Microsoft Visual Studio",
142142
"C:\\Program Files (x86)\\Microsoft Visual Studio",
143143
};
144-
static constexpr std::string_view years[] = {"2025", "2022", "2019", "2017"};
144+
// Newer VS installs use the major version as the directory ("18", seen
145+
// on windows-latest 2026-07: …\Microsoft Visual Studio\18\Enterprise),
146+
// older ones the year branding.
147+
static constexpr std::string_view years[] = {"19", "18", "2025", "2022", "2019", "2017"};
145148
static constexpr std::string_view editions[] = {
146149
"Enterprise", "Professional", "Community", "BuildTools", "Preview"
147150
};

0 commit comments

Comments
 (0)