With unified dialog for CMake presets, reconfigure happens when switching between build presets of the same configure preset

Jeroen Van Antwerpen 0 Reputation points
2026-01-05T13:53:22.98+00:00

In a simple setup where you have 1 configure preset and 2 build presets for it, switching between the presets causes a configure of the project when the unified menu is used and it does not do it.

This might not be relevant in a toy example that configures very fast, though it does matter when the step takes minutes.

Setup:

  • Create a file code.cpp, content irrelevant, it just needs to exist
  • Create a file CMakeLists.txt with content:
cmake_minimum_required(VERSION 3.27)
project(proj CXX)
add_library(lib code.cpp)
  • Create a file CMakePresets.json with content:
{
  "version": 6,
  "configurePresets": [
    {
      "name": "p",
      "binaryDir": "${sourceDir}/.out"
    }
  ],
  "buildPresets": [
    {
      "name": "p1",
      "configurePreset": "p"
    },
    {
      "name": "p2",
      "configurePreset": "p"
    }
  ]
}

To reproduce:

  • Open Visual Studio with all default settings, this should have the unified menu active and use the presets when available.
  • Wait until startup completed
  • Go in output window to 'CMake' in the drop down
  • Notice that the CMake output of CMake configure is there
  • Press the clear content
  • On top, switch from preset 'p1' to 'p2'
  • Notice that the CMake output of CMake configure is there

When disabling the unified menu, the last step does not happen.

Bug found on visual studio with this version:

Microsoft Visual Studio Professional 2022
Version 17.14.9 (July 2025)
VisualStudio.17.Release/17.14.9+36310.24.-july.2025-
Developer technologies | Visual Studio | Other
Developer technologies | Visual Studio | Other

A family of Microsoft suites of integrated development tools for building applications for Windows, the web, mobile devices and many other platforms. Miscellaneous topics that do not fit into specific categories.

0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.