From 3397155847f64dae9aa17a20aa5f0538a6a55686 Mon Sep 17 00:00:00 2001 From: Alexander Krabler Date: Thu, 3 Sep 2026 14:49:23 +0200 Subject: [PATCH] Presets: Fix vsInstanceVersion vendor field ignored when toolset is specified `vsInstanceVersion` vendor field at configure presets got ignored when `toolset` was specified, too. This caused the wrong VS developer environment to be loaded. The pinned version is now applied as a filter before matching the requested toolset, making `vsInstanceVersion` and `toolset` together useful. Closes #5074. --- CHANGELOG.md | 1 + src/presets/preset.ts | 11 +++++------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 16a798c25..21ff058e3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -64,6 +64,7 @@ Bug Fixes: - Show the CMake Tools activity-bar view immediately with an "initializing" placeholder instead of hiding the entire sidebar until CMake, kit, preset, and Visual Studio developer-environment probing completes. On machines where those probes are intermittently slow (e.g. aggressive antivirus scanning of spawned processes, or extension-host file-handle exhaustion), the sidebar no longer disappears for minutes during activation. Project commands, menus, and status items remain gated on full readiness, so nothing runs against a partially-initialized project. [#5027](https://github.com/microsoft/vscode-cmake-tools/pull/5027) - Refresh the open CMake Cache Editor when configuration changes cache values externally. [#3635](https://github.com/microsoft/vscode-cmake-tools/issues/3635) - Preserve `CMakeCache.txt` on folder open with CMake Presets when the active configure preset specifies no generator, so `cmake.configureOnOpen` performs an incremental configure instead of deleting the cache and reconfiguring from scratch. [#5049](https://github.com/microsoft/vscode-cmake-tools/issues/5049) +- Fix the `vsInstanceVersion` vendor field being ignored when a configure preset also specifies a `toolset`, causing the developer environment to be bootstrapped from the latest installed Visual Studio instance having the toolset compiler instead of the pinned major version. The pinned version is now applied as a filter before matching the requested toolset. [#5074](https://github.com/microsoft/vscode-cmake-tools/issues/5074) ## 1.23.52 diff --git a/src/presets/preset.ts b/src/presets/preset.ts index 047c0955f..1f3990cac 100644 --- a/src/presets/preset.ts +++ b/src/presets/preset.ts @@ -941,6 +941,11 @@ async function getVsDevEnv(opts: VsDevEnvOptions): Promise