Let us assume, I have 3 XSD schemas:
- BaseSchema.xsd: contains reusable types e.g., position, colour, address, countrylist
- SchemaA.xsd: includes the base schema and is specific to domain A
- SchemaB.xsd: includes the base schema and is specific to domain B
I would like to generate their corresponding C# classes. I can run
- "XSD.exe /c SchemaA.xsd BaseSchema.xsd" + "XSD.exe /c SchemaB.xsd BaseSchema.xsd" resulting 2 C# files that containing the classes from BaseSchema 2x. Not good.
- "XSD.exe /c SchemaA.xsd SchemaB.xsd BaseSchema.xsd" which results only one C# class for the types in BaseSchema.xsd. This is very nice, but not always possible. For example, if I have to use a third party assembly already containing the generated class of BaseSchema and Schema B.
Is there a way to incrementally generate C# classes? E.g., by including assemblies somehow in the command line to instruct the generator reusing the already generated C# classes instead creating them again?