views:

23

answers:

1

Okay, here's my issue (and my first question on SO!), and no, as much as i would like, i don't have a lot of say in how things are structured. One of those inherited farms that management won't let me change too much.

I'm in Visual Studio 2008 in a WinForms solution. My solution contains 5 Visual C++ Projects, some managed, some native. I also have a folder in my solution explorer that has several "common" header files that the various projects pull in..these happen to be API headers for several vendors. Can't get at the source behind these headers as i have just a static library and the .h files.

The folder layout looks like this:

/
/ProjectA
    /Debug
    /Release
    Files For Project A
/ProjectB
    /Debug
    /Release
    Files For Project B
/ProjectC
    /Debug
    /Release
    Files For Project C
/ProjectD
    /Debug
    /Release
    Files For Project D
/ProjectE
    /Debug
    /Release
    Files For Project E
/Common
    Headers are here.
/Debug
/Release

My Question to SO is this:

Instead of editing each project file's Properites->C/C++->General->Additional Include Directories to have a reference to ../Common, is there a better way, such as setting some hidden voodoo in the solution file so that all projects under the solution's banner automagically include this common directory?

I would rather keep it portable, so i don't want to go to Tools->Options->Projects and Solutions->VC++ Directories->Included Files and add an entry there, as it makes that edit locally and won't cascade to other developers when i check in this change.

Thanks! :-)

A: 

Unfortunately the project files are separate - the solution file can't communicate with them on this sort of thing.

If it makes it easier, you can edit the project files in a suitable text editor (including VS), you don't have to go through the tedium of the dialog box/property sheet for each one.

Will Dean
Tis as i feared. The tedium doesn't bother me, it's only 5 projects after all, it was more the thought of adding five separate failure points to this project. If no one pops up with a magic solution, i'll give you the answer :-S
Caladain