NMunro
NMunro

Reputation: 1290

Using XSD to generate CS file Produces Much Larger Class

I'm trying to update an XML to accept a currentYear value.

So I added: <xsd:element name="currentYear" type="xsd:string"/> to the .xsd file.

I then ran xsd and it generated a file.

This file is 10x the size of the previous .cs file.

Before it was generated with: Runtime Version:4.0.30319.239 The new file I generated was using: Runtime Version:4.0.30319.269

Would this make a big difference?

With the new .cs file I generated I can no longer compile.

Upvotes: 1

Views: 627

Answers (1)

NMunro
NMunro

Reputation: 1290

The issue ended up being the command I was using to create the file. I was using xsd /dataset /language:CS XSDSchemaFile.xsd, and everything worked fine once I tried xsd /classes /language:CS XSDSchemaFile.xsd

Upvotes: 1

Related Questions