How to include xsd: documentation in a C # class generated using XSD.exe?

I am using xsd.exe to create a C # class from a collection of xsd files. The xsd file uses the <xsd:documentation> to include useful descriptions. Example:

 <xsd:complexType name="AddressType"> <xsd:annotation> <xsd:documentation>A formatted or free form address and its intended use.</xsd:documentation> </xsd:annotation> 

Unfortunately, all of this is lost in the generated C # class. Interestingly, each class has an empty note documentation tag attached to it.

 /// <remarks/> 

How can I include this documentation in a generated C # class (tags or documentation tags)?

+6
c # documentation xsd xml-documentation
source share
2 answers

xsd.exe is based on Codedom.

You can parse xsd.exe and add functionality there and recompile. The code is quite simple.

I modified it to skip some namespaces from xsd when generating the code. [Otherwise, if I include common.xsd in 2 other xsds, the class is generated twice.]

Of course, I had access to the source itself (I was a developer at Microsoft), but the process should be simple and with disassembled code.

+1
source share

Sorry, there is no way to do this.

+1
source share

All Articles