How to exclude autogenerated class?

Topics: User Forum
May 2, 2007 at 12:57 PM

I have a project which have a DataSet created using the Data Designer of VStudio 2005 resulting in a bunch of classes.

Since it is auto generated, the <exclude> tag will not survive long in the source file.

Is there another way to have the classes being excluded from appearing in the doc?

If there is none, is it possible to code a SHFB/SandCastle component to filter the classes?

Thank you very much.
May 2, 2007 at 3:03 PM
For the time being, you can create a standalone XML comments file that contains an entry for the class with an <exclude/> tag. See the FAQ in the help file for details. A future release will support an exclusion filter within the project as well.

May 2, 2007 at 6:37 PM
<Mr. Burn's voice> Excellent! </Mr. Burn's voice>

Looking forward for the exclusion filter, in the coming days... ;)

The XML comment file does the work although it slows down the build process considerably... 10 seconds or so for each exclusion...

Also, I have 50 autogenerated classes: 1 top level class and the other are child classes... Is there a way to only specify the top class to exclude and having the child classes automatically excluded? I thought by having the exclude on the top class would have been enough but this is not the case.

Thank you very much and keep up the good work !
May 2, 2007 at 6:47 PM
<exclude/> only works on the item on which it is placed so it wouldn't affect derived classes. If they were all in a common namespace you could exclude that and it would get rid of all of the classes.

May 4, 2007 at 2:46 PM
Yes, that's what we do -- autogenerated classes go into a separate namespace. Makes things cleaner for Intellisense, too.