Home Dashboard Directory Help

XmlSerializer Code Generation component cannot handle nested unbounded elements when there is only one element by mohanmg


 as Won't Fix Help for as Won't Fix

Sign in
to vote
Type: Bug
ID: 471297
Opened: 6/29/2009 10:24:35 PM
Access Restriction: Public
User(s) can reproduce this bug


XmlSerializer Code Generation component: It cannot handle the xsd definitions that have only one element and the occurence of the element is unbounded.

<complexType name="pType">
    <element name="Par" type="tns:nType" minOccurs="0" maxOccurs="unbounded"/>

The following thread discusses this issue in detail.
Sign in to post a comment.
Posted by Microsoft on 7/14/2009 at 2:59 PM
This is a known issue in the XmlSerializer. To avoid the risk of regression we are only fixing customer blocking issues in the XmlSerializer. You can work around this issue by adding a dummy attribute to the XML schema that you generate the serialization code from.

Thank you

Daniel Roth
Program Manager
Posted by mohanmg on 7/14/2009 at 2:00 AM
This bug does not happen when there are more than 1 elements in the complexType. Even for the case when there is just one element with maxOccurs=unbounded, the bug does not happen always. There is a specific pattern for which this bug happens.

Posted by Frank D Xu on 7/8/2009 at 9:37 PM
Please advise if the fix is availiable.
Does this bug happen when there are more than 1 elements, and the maxOccurs is unbounded?

<complexType name="pType">
    <element name="Par" type="tns:nType" minOccurs="0" maxOccurs="unbounded"/>
    <element name="Xyz" type="tns:nType" minOccurs="0" maxOccurs="unbounded"/>
Posted by Microsoft on 7/1/2009 at 12:11 AM
Thanks for your feedback. We are routing this bug to the product unit who works on that specific feature area. The team will review this issue and make a decision on whether they will fix it or not for the next release.

Thank you,
Visual Studio Product Team
Sign in to post a workaround.