Classes generated with incorrect member types

May 13, 2011 at 5:47 PM

I've generated some C# classes from XSDs using the instructions from here: http://stackoverflow.com/questions/386155/comparison-of-xsd-codegenerators-c

Most of them are fine, but some have a problem with the types of some of the mebers that have been generated.

The member types have been created with the class name appended to the front of them.

So in this example of a .cs file

<SNIP>

using System.Collections.Generic;

using System.Runtime.Serialization;

[System.Runtime.Serialization.DataContractAttribute(Name="OPSPEC")]

public partial class OPSPEC {

private OPSPECLocation locationField;        // this is wrong

<SNIP>

The OPSPECLocation in the last line is wrong as the member's type should be 

private Location locationField; 

which would work just fine. Unfortunatly there are too many to change manually and I think it's becase I have done something worng. 

Has anyone seen such behaviour before?

Thanks in advance.

D

P.S.

Apologies If I sound like a bit of a noobe to this, but that's exactly what I am :-(