Generating a MY_APP.vcxproj.user file

I’m trying to use CMake to configure some parameters for the Visual Studio debugger to make it easier to start a debug session. I have the following code in a file that is included in the top CMakeLists.txt file. The included file is located in a subdirectory of the folder containing the top CMakeLists.txt file.

set_target_properties(MY_APP PROPERTIES
    VS_DEBUGGER_COMMAND "$(TargetPath)"
    VS_DEBUGGER_COMMAND_ARGUMENTS "${CMAKE_CURRENT_SOURCE_DIR}/test_vectors/input/input.pcm output.pcm"

I am using CMake version 3.23.1 and the Visual Studio 15 2017 generator. I have searched through numerous posts, the online documentation and books. My understanding is that by setting these properties, a MY_APP.vcxproj.user file will be created in the binary directory with those properties configured. However, no MY_APP.vcxproj.user file is created. Is this supposed to work that way? If so, what am I missing?


I don’t think it ends up in the .user file but instead the main MY_APP.vcxproj file. Do your settings show up there?

Yes, the settings are showing up in the .vcxproj. And they are working. If you set them or modify them manually, Visual Studio then creates a .user file, which is why I was expecting to find them there.

I think that is the split between “what the project specifies” and “the user modifies things on top of the project” and allows for committing the “core” project files to VCS and custom settings to sidecar without interfering.