Archive for May 24, 2014

Can only generate one of classes or data sets – Error with Xsd.exe tool

I was getting below exception when I try to generate a class file from my XML schema using command (xsd “mySchema.xsd”)

XSD tool - Error

XSD tool – Error

Reason & Fix –

  • Reason is, Xsd tool unable to determine whether to generate Dataset or Class
  • Fix is, pass argument “/c” to generate Class or “/d” to generate Dataset
  • In my case I wanted to get a class so I prepared command (xsd “mySchema.xsd” /c)
XSD tool - generate class

XSD tool – generate class