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

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

🙂

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: