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.
Created attachment 4645 [details]
MSBuild properties are escaped on save, breaking the build on "complicated" .csproj files.
1. Extract App.zip, then open App.sln
2. Note that App.csproj contains this fragment:
<Compile Include="$(IntermediateOutputPath)\Foo.cs" />
3. Within the Solution panel, right-click the App project then click Add > New File...
4. Within the New File dialog, select General > Empty Class. Click New.
5. View App.csproj.
Expected behavior: the line mentioned in (2) is unchanged. This is what Visual Studio does.
Actual behavior: the line mentioned in (2) is changed, and '$', '(', and ')' are hex encoded:
<Compile Include="%24%28IntermediateOutputPath%29\Foo.cs" />
This causes builds to break; what used to build Just Fine (with xbuild) no longer does so:
: error CS2001: Source file `$(IntermediateOutputPath)/Foo.cs' could not be found
The question is how exactly we can roundtrip this sanely, since the MSBuild expression characters are legal in filenames, and we should be exposing unescaped values in the UI. Currently we unescape on deserialize, and escape on serialize, which is why you're seeing this.
One possibility would be that when saving we could inspect the existing serialized value in the file, and if it matches w/o escaping, then we wouldn't escape it.
Also, that's not a property, it's an itemspec.
*** Bug 14041 has been marked as a duplicate of this bug. ***
Bump. This issue is still present in commit 23bd904220e6cf768e73447429cbbb8ea69075de of MonoDevelop. Is there any chance it would be resolved?
I just tested the behaviour on VisualStudio 2012 and it works fine there.
Fixed in XS 6.0.