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
Developer Community or GitHub 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.
OS: Android 2.3
XElement.ToString will display a default prefix of p1 if there is no other prefix assigned.
The application I'm running serializes isolated XElements to a string to be streamed over the network (since it uses XMPP to communicate). Because of this, classes derived from XElement, need to be serialized into a string and sent over, sometimes without any prefix attached to an element name.
With the latest version of Mono For Android (this behavior was not present in earlier versions), a prefix of p1 is added to the string.
Steps to Reproduce:
XNamespace ns = "http://jabber.org/protocol/geoloc";
XElement newElement = new XElement(ns + "geoloc");
<p1:geoloc xmlns:p1="http://jabber.org/protocol/geoloc" />
Expected Output (on Windows):
<geoloc xmlns="http://jabber.org/protocol/geoloc" />
Additional Builds and Platforms:
This issue did not appear on version 4.2 (seems to have been introduced in 4.2.2)
Fixed in mono master and mono-2-10. Thanks for the report.