Sandor Davidhazi
Sandor Davidhazi

Reputation: 928

.xsd comments in xsd.exe generated wrapper class

I have an xsd file in my csproj, from which xsd.exe generates a wrapper cs file.

I'd like to comment the xsd file in a way, that the comments are also inserted into the generated wrapper class, so VS intellisense can be used effectively.

Is this possible using xsd.exe?

Upvotes: 2

Views: 2538

Answers (1)

Filburt
Filburt

Reputation: 18061

Apparently this seems to be not possible with xsd.exe:

When generating source code from an XML Schema document, Xsd.exe ignores the <appinfo> element and its contents.
The same is true for the parent of the <appinfo> element, <annotation>.

I tried and I didn't find any way to force xsd.exe to spit out any documentation contained in the schema.


UPDATE

I will try out XsdDataContractImporter - maybe this offers more control over code generation from xsd schema.

Upvotes: 3

Related Questions