# VS 2022 configuration build preset selector missing

**URL:** https://discourse.cmake.org/t/vs-2022-configuration-build-preset-selector-missing/13960
**Category:** Usage
**Tags:** os:windows, tool:cmake
**Created:** [April 18, 2025, 3:57pm UTC](https://discourse.cmake.org/t/vs-2022-configuration-build-preset-selector-missing/13960 "2025-04-18T15:57:27Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![mandrews](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/m/b5ac83/32.png) [@mandrews](https://discourse.cmake.org/u/mandrews)
#### Post date: [April 18, 2025, 3:57pm UTC](https://discourse.cmake.org/t/vs-2022-configuration-build-preset-selector-missing/13960/1 "2025-04-18T15:57:27Z")

</div>

Just starting to use the cmake tools built into VS 2022 and i built a quick windows test program based off of the CMakeLists.txt and CMakePresets.json which are generated when i create a new project using the ‘CMake Project’ template. This works fine; the test project builds and runs. The issue is that I can’t find a way to switch from a Debug build config to Release. In the Standard Toolbar, the ‘Build Preset Selector’ is not showing, even though in the toolbar configuration it is enabled. I tried forcing this with ‘set(CMAKE\_CONFIGURATION\_TYPES “Release”)’ in CMakeLists.txt and nothing. Seems like I’m missing something obvious.

---

<div class="post-metadata">

### Author: ![ClausKlein](https://discourse.cmake.org/user_avatar/discourse.cmake.org/clausklein/32/352_2.png) [@ClausKlein](https://discourse.cmake.org/u/ClausKlein)
#### Post date: [April 18, 2025, 4:05pm UTC](https://discourse.cmake.org/t/vs-2022-configuration-build-preset-selector-missing/13960/2 "2025-04-18T16:05:58Z")

</div>

Is your project available?

With CMake presets, you need i.e. a Debug and a Release preset.

---

<div class="post-metadata">

### Author: ![mandrews](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/m/b5ac83/32.png) [@mandrews](https://discourse.cmake.org/u/mandrews)
#### Post date: [April 18, 2025, 5:19pm UTC](https://discourse.cmake.org/t/vs-2022-configuration-build-preset-selector-missing/13960/3 "2025-04-18T17:19:52Z")

</div>

here is the CMakePresets.json file:

```auto
{
    "version": 3,
    "configurePresets": [
        {
            "name": "windows-base",
            "hidden": true,
            "generator": "Ninja",
            "binaryDir": "${sourceDir}/out/build/${presetName}",
            "installDir": "${sourceDir}/out/install/${presetName}",
            "cacheVariables": {
                "CMAKE_C_COMPILER": "cl.exe",
                "CMAKE_CXX_COMPILER": "cl.exe"
            },
            "condition": {
                "type": "equals",
                "lhs": "${hostSystemName}",
                "rhs": "Windows"
            }
        },
        {
            "name": "x64-debug",
            "displayName": "x64 Debug",
            "inherits": "windows-base",
            "architecture": {
                "value": "x64",
                "strategy": "external"
            },
            "cacheVariables": {
                "CMAKE_BUILD_TYPE": "Debug"
            }
        },
        {
            "name": "x64-release",
            "displayName": "x64 Release",
            "inherits": "x64-debug",
            "cacheVariables": {
                "CMAKE_BUILD_TYPE": "Release"
            }
        },
        {
            "name": "x86-debug",
            "displayName": "x86 Debug",
            "inherits": "windows-base",
            "architecture": {
                "value": "x86",
                "strategy": "external"
            },
            "cacheVariables": {
                "CMAKE_BUILD_TYPE": "Debug"
            }
        },
        {
            "name": "x86-release",
            "displayName": "x86 Release",
            "inherits": "x86-debug",
            "cacheVariables": {
                "CMAKE_BUILD_TYPE": "Release"
            }
        }
    ]
}

```

---

<div class="post-metadata">

### Author: ![ClausKlein](https://discourse.cmake.org/user_avatar/discourse.cmake.org/clausklein/32/352_2.png) [@ClausKlein](https://discourse.cmake.org/u/ClausKlein)
#### Post date: [April 19, 2025, 8:06am UTC](https://discourse.cmake.org/t/vs-2022-configuration-build-preset-selector-missing/13960/4 "2025-04-19T08:06:11Z")

</div>

You need a `build preset` for every `configure preset` at least.  
I recommend to add` workflow presets` too.

---

<div class="post-metadata">

### Author: ![mandrews](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/m/b5ac83/32.png) [@mandrews](https://discourse.cmake.org/u/mandrews)
#### Post date: [April 20, 2025, 1:26am UTC](https://discourse.cmake.org/t/vs-2022-configuration-build-preset-selector-missing/13960/5 "2025-04-20T01:26:53Z")

</div>

thanks for the help Claus!
