-
Notifications
You must be signed in to change notification settings - Fork 77
Description
Hi!
When creating a bug report with CustomInfo object set, NBug throws an exception when trying to submit this report. This problem was mentioned earlier here on StackOverflow.
In Report.cs the report class gets serialized in the ToString Methodwith this code:
var serializer = this.CustomInfo != null
? new XmlSerializer(typeof(Report), new[] { this.CustomInfo.GetType() })
: new XmlSerializer(typeof(Report));
so if setting CustomInfo != null the XmlSerializer constructor with the "extraTypes" parameter gets called. See MSDN.
After restarting the application, NBug tries to submit the bug report, this leads to Dispatcher.cs method GetDataFromZip(Stream stream) the deserialization of the report file happens always with the following call: var deserializer = new XmlSerializer(typeof(Report));
Unfortunately this leads to a wrongly deserialized Xml so the CustomInfo member of the Report class gets deserialized to a XmlNode[] which in turn cannot be correctly serialized later when submitting the bugreport.
Kind regards,
Andy