views:

32

answers:

2

We have a VS solution with 99 projects. I'd like to extract XML documentation for them.

So far, the only procedure I've found involves several hundred mouse clicks; e.g. open each project properties page, one by one, find the "Generate documentation" check box, and click it. The default filename is fine.

Worse: I have to do that twice per project, once for "Release" and once for "Debug".

Is there a magic button that says "enable documentation for all projects in this solution"?

This is a general problem with project-level configuration. For example, I'd like to also set the output build directory for all projects to the same place: $SolutionRoot/bin rather than each going into 99 different $ProjectRoot/bin directories.

What is the recommended strategy for dealing with this? In makefile-land, I'd have a master makefile that defined a bunch variables that each sub-makefile would use. What's the equivalent for Visual Studio? (I'm using VS 2008)

A: 

For something like this, you'll want to use Visual Studio's property sheets.

Though it will be a PITA to assign the same property sheet to all 99 projects, making changes that apply to all projects in the future will be much easier - 1 change versus the original 99.

You may also want to consider creating a hierarchy of property sheets that apply to different types of projects (executables, libraries) or configurations (debug, release) to allow even more fine-grained control without requiring massive duplication.

EDIT: I guess property sheets are not available for languages other than C++. For other languages (like C#) you could refer to this answer.

Nick Meyer
+1  A: 

Project files are XML, I wrote a program to open each project file as an XDocument, add the required Elements and save it again. Next time I opened visual studio, the properties were set.

gbanfill