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 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.
*Description with Use-case:
In Xamarin.Android and using the "Proguard" feature, one can specify a custom Proguard.cfg file which specifies rules for Proguard to follow.
To do this, one would create a new file called "Proguard.cfg" and add the Build Action of "ProguardConfiguration".
Now the user can add their rules inside this Proguard.cfg file. The problem however is that the Proguard.jar tooling requires the file to not have a BOM(byte order mark). I describe this problem here:
Now although this is a more generic issue regarding adding a BOM to any modified file, it makes the use case of editing any file that needs to have no BOM almost impossible. Thus the user would have to stay away from Visual Studio when editing these files to ensure the BOM isn't re-added.
I've tried just about every editor inside the "Open With" dialog, but they all seem to re-add the BOM.
There is a very similar issue for Visual Studio for Mac here:
Saving a file without BOM would remain without a BOM
Saving a file without BOM adds a BOM causing tooling to fail
Microsoft Visual Studio Enterprise 2017
Version 15.2 (26430.16) Release
Xamarin 22.214.171.1246 (fec6f88)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.
Xamarin.Android SDK 126.96.36.199 (9dbc4c5)
Xamarin.Android Reference Assemblies and MSBuild support.
Xamarin.iOS and Xamarin.Mac SDK 10.10.0.37 (ad35de4)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.
I can confirm using the latest Visual Studio 2017 Preview version 15.3 I am able to reproduce this issue. Marking this report as CONFIRMED.
However, you can find the work around at https://developer.xamarin.com/guides/android/deployment,_testing,_and_metrics/proguard/#File_Issues
This issue makes Proguard very difficult to work with on Windows (which most serious apps will be using). We should try and fix this in 15.5 if possible.
Tentatively moving this feature work to 15.6. We will create an associated work item for tracking in VSTS when we begin work on that milestone.
Thanks for taking the time to report this issue. :)
Given this is a feature request or enhancement, I am closing this issue and adding a work item to our backlog.