views:

141

answers:

1

I have a solution with many many projects, I did not write this project but it's an open source project (mysql++) , I need to include an include path to all projects. I would like to just globally add this include path to the solution and have it cascade down to all the projects... is this possible? I dread thinking about having to do the same thing for each individual project.

Thank you, Alessandro Ferrucci

+1  A: 

Visual Studio lets you modify many projects at once. Simply click the first in the Solution Explorer, shift-click the last, and right-click the group to get to the project properties. Now any changes you make affect all projects you selected.

Don't do this if individual projects have different include path settings and they must continue to have different settings. Changing the include path in this way will make them all the same. This may be fine even if they currently have different settings if you can agree on a path that makes sense for all the projects.

If each project has to have a different include path, the best way I know to do what you want is to open all the project files in a plain text editor, search for AdditionalIncludeDirectories, and paste the MySQL++ include directory plus a semicolon into the string that follows. Be sure to do this for all places that attribute appears in each project. At minimum, there will be two: one each for Release and Debug builds.

EDIT: If you use a good text editor, this can be a lot faster than doing the same operation inside Visual Studio. I recommend Vim, if you already have vi skills. Its . command to repeat the previous edit makes the "search, navigate, change" cycle much faster.

Warren Young