Relative Content

Tag Archive for cmakevisual-studio-2022

CMakePresets.json and CMakeUserPresets.json get overwritten to default content in Visual Studio 2022

I’m encountering an issue with CMakePresets.json and CMakeUserPresets.json in Visual Studio 2022. When I modify these files in Visual Studio 2022, they get overwritten with their default content after saving. However, if I edit these files using another editor like Visual Studio Code, the changes are saved correctly. But as soon as I open the project in Visual Studio 2022 as a CMake project, the files are regenerated with the content they had before my changes.
Visual studio is set to use CMakePresets.json if available, otherwise CMakeSettings.json.