Microsoft KB Archive/929505

= The XML Schema Definition tool does not generate an attribute for an element in the .NET Framework 2.0 =

Article ID: 929505

Article Last Modified on 12/3/2007

-

APPLIES TO


 * Microsoft .NET Framework 2.0

-



SYMPTOMS
The XML Schema Definition tool (Xsd.exe) in the Microsoft .NET Framework 2.0 does not generate a System.Xml.Serialization.XmlElementAttribute attribute for an element in a nested substitution group. Therefore, an XML stream cannot be serialized or deserialized as expected.



CAUSE
This issue occurs if the XML input schema uses nested substitution groups. Nested substitution groups are not supported in the .NET Framework 2.0.



WORKAROUND
To work around this issue, edit the generated class to add the System.Xml.Serialization.XmlElementAttribute attribute. For information about how to edit the generated class, visit the following MSDN Web site:

http://msdn2.microsoft.com/en-us/library/awac9czf.aspx



MORE INFORMATION
For more information about Xsd.exe, visit the following MSDN Web site:

http://msdn2.microsoft.com/en-us/library/x6c1kb0s(vs.71).aspx

For mote information about substitution groups, visit the MSDN Web site that is mentioned in the &quot;Workaround&quot; section.

Keywords: kbinfo kbtshoot kbbug kbnofix kbprb KB929505

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.