Search code examples
visual-studiovisual-c++projects-and-solutions

Force visual studio to have same include directories between debug and release mode


I was wondering if there is a way to synchronize settings for include and link directories between debug and release configurations for project/solution?

More precisely, is there any way to tell visual studio I would like project properties

  • C/C++ - > General -> "Additional Include Directories"
  • Linker -> General -> "Additional Library Directories"
  • Linker -> Input -> "Additional Dependencies"

to be same for debug and release configuration, or somehow efficiently/automatically forward those settings from one configuration to the other configurations? Perhaps there is any plugin/script for that, since it is only necessary to change few lines in project text file to do what I want?

I'm currently using visual studio 2005, but I think this feature should not depend too much on version of the studio, so please post answers/solutions for any version of visual studio.


Solution

  • Use property sheets: create a property sheet containing the common properties, then include it in each build configuration. Do everything via the Property Manager window; be careful now: any change you want to make to the common properties must be made in the property sheet, not in the project properties!