https://bugzilla.novell.com/show_bug.cgi?id=372780


           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: [email protected]
        ReportedBy: [EMAIL PROTECTED]
         QAContact: [email protected]
          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.
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to