Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
GitHub or Developer Community with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
The XmlException class has the wrong HResult and Default message value.
To reproduce this issue run the following code snippet
System.Xml.XmlException v5 = new System.Xml.XmlException();
int hResult = v5.HResult;
string message = v5.Message;
hResult = -2146232000, message = "An XML error has occurred."
Xamarin Android output:
hResult = -2146233087, message = "A system exception has occurred."
The code The expected output occurs in .Net 4.5 on the Desktop and the
The code snippet above was placed in a PCL project and was run on an android 4.4.2
emulator and a Windows Phone 8.1 emulator and .Net 4.5 on the Desktop
Additional Build Environment info:
Xamarin.Android Version: 4.16.0 (Business Edition)
Java SDK: C:\Program Files (x86)\Java\jdk1.6.0_39
This is a Mono class library bug:
$ csharp -r:System.Xml;
csharp> var x = new System.Xml.XmlException ();
"A system exception has occurred."
Regardless of whether we have already imported XmlException from referencesource, HResult and message value difference cannot be a bug. They are not documented feature at all.