简体   繁体   中英

Xamarin/Visual Studio 2015: Custom Proguard configuration

I need to make a customized Proguard configuration. However I cannot find out how to do that. When building a new configuration file is copied into the /obj/release/proguard folder. How can this configuration file be customized?

  1. Just put your Proguard.cfg into your Project
  2. Right click on Proguard.cfg > "Build Action" > "ProguardConfiguration"

在此输入图像描述

The above answer is 100% correct on how to add the file. To make sure you file gets picked up you can check the output logs, it will contain something like this:

ProguardConfigurationFiles:
      {sdk.dir}tools\proguard\proguard-android.txt;
      {intermediate.common.xamarin};
      {intermediate.references};
      {intermediate.application};
         Proguard.cfg;

NOTE: Make sure that you set your MSBuild output verbosity to Detailed for this (Tools > Options > Build and Run)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM