Sep 29, 2009 at 4:24 PM
Edited Sep 29, 2009 at 4:26 PM
Further to this I had lots of issues with repeated element types in namespaces.
It seems that LinqToXSD loads all XSD namespaces into the XmlSchemaSet, regardless of whether these have been already added by an <xsd:import /> or added as part of the compile.
In build 17994, code file XObjectsGenerator.cs at line 53 there is:
I would suggest changing to:
XmlSchema xsd = XmlSchema.Read(CreateReader(arg), ValidationCallback);
// only add schema if not already included
The schema set for my application is very complex an d a lot of schemas are inter-dependent, so LinqToXsd created a code file over 200,000 lines long (it was interesting trying to open that one up I can tell you).
I am going to modify the source code for my own purposes but I think I've also found a bug where it misses some element types out completely resulting in more errors.. will advise