tags:

views:

273

answers:

1

Using the command line:

"xsd.exe" "OFX 2.1.1 schema/OFX2_Protocol.xsd" /c /namespace:OFX /nologo"

The resulting C# source file fails to build with these errors:

D:\blah\OFX2_Protocol.cs(19,6): error CS0579: Duplicate 'System.CodeDom.Compiler.GeneratedCodeAttribute' attribute
D:\blah\OFX2_Protocol.cs(20,6): error CS0579: Duplicate 'System.SerializableAttribute' attribute
D:\blah\OFX2_Protocol.cs(21,6): error CS0579: Duplicate 'System.Diagnostics.DebuggerStepThroughAttribute' attribute
D:\blah\OFX2_Protocol.cs(22,6): error CS0579: Duplicate 'System.ComponentModel.DesignerCategoryAttribute' attribute
D:\blah\OFX2_Protocol.cs(23,6): error CS0579: Duplicate 'System.Xml.Serialization.XmlTypeAttribute' attribute
D:\blah\OFX2_Protocol.cs(24,6): error CS0579: Duplicate 'System.Xml.Serialization.XmlRootAttribute' attribute

A similar XSD schema, which I copied from the OFX2 schema then trimmed down to the useful bits that I wanted, generates a C# file which builds just fine, yet has all the same attributes as the full schema's C# representation.

Any idea why? Is the OFX schema broken? Is xsd.exe broken? Is C# broken? Am I broken?

A: 

I don't like being labelled as having a 95% accept rate just because I've not accepted an answer for this question, so I'm answering it with "xsd.exe is broken", which as far as I can tell is the closest to the truth (given all the other problems it has).

Ben Hymers
questions without answers are not decreasing your accept rate as there is nothing to accept.
lubos hasko
Yeah, I found that out after a while, turns out it just takes a while to update your accept rate. I accepted this one and another question and it still showed as 95% for a number of hours (even after clearing cache etc.).
Ben Hymers