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.
When you try to save a project after you have selected an iPhone Bundle Signing Identity that has a "&" ampersand character in it, you get an error saving.
"Save failed. a name did not start with a legal character 32() Line 1, position 33."
I have verified it is definitely the & causing the issue, I suspect it is because the & needs to be escaped to & for the xml serializer to work with it correctly.
Moving to MD core, this is a problem with the project serializer.
@lluis: I'm not sure if the fix fixes all. I assume it fixes only this special bug and it occurs in other situations as well & maybe I fixed it at the wrong location.
Can you take a look at:
This looks like it should fix it. Out of curiosity, why wouldn't you use one of the Escape or Unescape methods already exposed within the .net framework? Besides that, looks good. What build will this make it into?
@mike: Yeah, it's not the right level, and those methods don't handle full XML escaping. We should be using the XML DOM's built-in escaping instead of using InnerXml (so that we have 100% correct escaping), and we can only do that a level down. I think MSBuildProperty.Value should be the text value (InnerText). We could expose MSBuildProperty.XmlValue or ChildNodes if anything really needs to read/write XML verbatim, but I don't think MSBuild properties can have XML content, so it's probably not necessary. It looks like this problem applies to item metadata as well. But as you say, we need Lluis' input.
Warren: I don't think .NET exposes a method to escape/unescape XML. it's only something that happens transparently within XmlReader/XmlWriter.
If you look where my bug is happening though, its the value inside the xml element that's causing it. Specifically an &. The HtmlEncode and HtmlDecode methods (System.Web?) should work perfectly for that when setting and reading the node into the object to be serialized/deserialized when writing the config to disk.
We can't just encode items however we want. We need to do it the same way that other MSBuild tools do.
This bug appears to be happening again in the latest version of Xamarin Studio 4.0.12 (build 3), stable release. With respect to iOS Bundle signing, my "identity" field contains the name of one of my Enterprise customers whose name happens to contain an ampersand. Now when I try to save any changes to my project, I get the dreaded "Save failed. a name did not start with a legal character 32 () Line 1, position 38" error.
This was not happening in recent previous versions of Xamarin Studio.
*** Bug 13980 has been marked as a duplicate of this bug. ***
This regression seem to have been introduced by https://github.com/mono/monodevelop/commit/a539f96337b4a2b1d98404745c4f96a88a4e5473#L1R1796
The fix pointed to is a month old. Would the "alpha" channel (where I am using 4.1.9 build 6 be that old? Or is this still a present issue?
(ah I see, you indicate is a regression, nevetrmind)
Should be fixed by https://github.com/mono/monodevelop/commit/0865add6ff453c936245d17cda31e2a2add2b644
Is this fix included in any of the current Xamarin Studio builds? I'm trying to deploy to the app store but can't select my provisioning profile because my team name has a & in it. Are there any work-arounds for this?
No, it's not. It should be in the next release. Only workaround I know would be using Xamarin Studio 4.0.10, sorry!
How do I revert my version from 4.0.12 to 4.0.10? Any idea when the next release will be?
You can download it here: http://download.xamarin.com/studio/Mac/XamarinStudio-4.0.10-7.dmg
No ETA on the next release, sorry.
*** Bug 14121 has been marked as a duplicate of this bug. ***
Please, can you fix this even in version 4.0.12-3?
Thank you very much.
I follow up with my previous request just to confirm that this issue has been resolved with Xamarin Studio 4.0.13. Thank you.
Thanks for the confirmation!