Bulk change for child projects. RRS feed

  • Question

  • I have a solution file with about twenty or so child projects inside of it. For each child project I need to change the path for a directory for includes and the path for a directory for linker library. I have been doing this each project by each project which is really time consuming. Is there a way to change all the projects at the same time and change the path for the directories in project settings? Thanks!
    Monday, March 21, 2011 6:21 AM


  • Good news and bad news.  Bad news first; you are going to have to make a change to all the directory settings for all the child projects....again.  The good news: you won't have to again.

    Assuming you are using VS 2010, right click the child project  and go to Configuration Prop. >> VC++ Directories.  Check that the selected configuration on top is set to "All configurations" and not just the Active(Debug) version (Otherwise you are only going to set it up for the debug configuration).  In each directory field, open the drop down list and click "<Edit..>".

    Check the "Inherit from parent or project defaults" box. 

    That's it! Now you can make changes only to the parent project directories and all the child projects will follow suite.  This is bad timing to discover this now, but from now onwards you can do it from the start.

    • Proposed as answer by Nakter Tuesday, March 22, 2011 6:27 AM
    • Marked as answer by S.e.p.y Wednesday, March 23, 2011 7:13 PM
    Tuesday, March 22, 2011 6:24 AM