How to generate .NET 4.0 classes from xsd?

simple enough; just run (at the vs command prompt)

xsd your.xsd /classes

(which will create your.cs). Note, however, that most of the intrinsic options here haven’t changed much since 2.0

For the options, use xsd /? or see MSDN; for example /enableDataBinding can be useful.

Leave a Comment