# CMake does not seem to allow adding a project property sheet (Visual Studio) for each configuration (Debug and Release)

**URL:** <https://discourse.cmake.org/t/cmake-does-not-seem-to-allow-adding-a-project-property-sheet-visual-studio-for-each-configuration-debug-and-release/11684>\
**Category:** Code\
**Created:** [September 14, 2024, 6:53pm UTC](https://discourse.cmake.org/t/cmake-does-not-seem-to-allow-adding-a-project-property-sheet-visual-studio-for-each-configuration-debug-and-release/11684 "2024-09-14T18:53:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dnguyen052924](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/d/258eb7/32.png) [@dnguyen052924](https://discourse.cmake.org/u/dnguyen052924)\
**Post date:** [September 14, 2024, 6:53pm UTC](https://discourse.cmake.org/t/cmake-does-not-seem-to-allow-adding-a-project-property-sheet-visual-studio-for-each-configuration-debug-and-release/11684/1 "2024-09-14T18:53:39Z")

</div>

I have 2 .props files, one is for Debug, and the other one is for Release. I’ve tried 2 ways below using generator expressions, but none of them works, no file is added/shown in the Property Manager window in Visual Studio:

```auto
set_property(TARGET MyTarget PROPERTY VS_USER_PROPS
    $<$<CONFIG:Debug>:${PROJECT_SOURCE_DIR}/../Include/prop_sheet_Debug.props>
    $<$<CONFIG:Release>:${PROJECT_SOURCE_DIR}/../Include/prop_sheet_Release.props>
)

set_property(TARGET MyTarget PROPERTY VS_USER_PROPS "${PROJECT_SOURCE_DIR}/../Include/prop_sheet_$<CONFIG>.props")

```

This works, but it’ll add the `prop_sheet_Debug.props` file to both Debug and Release configurations of the target (shown in the Property Manager window), which is undesirable:

```auto
set_property(TARGET MyTarget PROPERTY VS_USER_PROPS "${PROJECT_SOURCE_DIR}/../Include/prop_sheet_Debug.props")

```

I guess one workaround is to pass in a value for CMAKE\_BUILD\_TYPE and check its value in the CMakeLists.txt file, although it’ll probably still add the same .props file to both Debug and Release. I’d greatly appreciate if anyone could give me a better way to achieve it!
