Quantcast
Channel: xsd2Code community edition .net class generator from XSD schema
Viewing all articles
Browse latest Browse all 543

Commented Issue: xs:choice nested in xs:sequence throws exception [14767]

$
0
0
If a xs:choice is nested in a xs:sequence running the generated code throws an exception like:
Type of choice identifier 'Items1ElementName' is inconsistent with type of 'Items1'. Please use array of System.Collections.Generic.List ...
This error was raised and described in http://xsd2code.codeplex.com/discussions/48138 and http://xsd2code.codeplex.com/discussions/224616 but no real solution was provided in any of the discussion threads as replacing the List by an array causes another error (at least in NET 4): Unable to generate a temporary class (result=1). error CS1061: 'System.Collections.Generic.List<namespace.FlexPropType>' does not contain a definition for 'Length' and no extension method 'Length' accepting a first argument of type 'System.Collections.Generic.List<namespace.FlexPropType>' could be found (are you missing a using directive or an assembly reference?) (this error is described at http://stackoverflow.com/questions/6866301)

So maybe a modification in the Xsd2Code code template could solve this issue.
Comments: ** Comment from web user: mightymuke **

I'm afraid you can't as it hasn't been applied to the source yet. If you need it urgently then your best bet is to download the current source and build it yourself. Based on the status of other patches, this may also be your only option.

Note that I've only tested it in my application, so while it get the WOMM (Works On My Machine) stamp, it may not work for you.


Viewing all articles
Browse latest Browse all 543

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>