[Mono-bugs] [Bug 372780] New: sgen.exe generates invalid XmlSerializerContract

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Mar 20 15:13:03 EDT 2008


           Summary: sgen.exe generates invalid XmlSerializerContract
           Product: Mono: Tools
           Version: 1.9.0
          Platform: i686
        OS/Version: Linux
            Status: NEW
          Severity: Major
          Priority: P5 - None
         Component: tools
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: dbera.web at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---

Created an attachment (id=203242)
 --> (https://bugzilla.novell.com/attachment.cgi?id=203242)
workaround : explicitly set the key of the XmlMapping

The XmlSerializerContract created by sgen is invalid and does not run because
it fails to add the correct key for each type. As a result, when ran, the code
throws "duplicate key in hashtable" exception. This is due to the empty key in
the generated code ... snippet follows:

public override XmlSerializer GetSerializer (Type type)
  switch (type.FullName) {
  case "Beagle.SnippetRequest":
    return (XmlSerializer) TypedSerializers [""];

Maybe the bug is elsewhere, but it can be worked around by explicitly setting
the key in sgen.cs in the XmlMapping table.

Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.

More information about the mono-bugs mailing list