Forum Xamarin.Forms

Dotfuscator does not work in Xamarin Forms

HeroRMohammedHeroRMohammed Member ✭✭
edited July 2018 in Xamarin.Forms

I am trying to protect my Xamarin Forms app Using DotFuscator. I am following all the steps from dotfuscator's user guide using the CE edition.

  1. PreEmptive.Dotfuscator.Xamarin.targets added to the root directory of the project.

  2. Edited Android Project file. Created:

<PropertyGroup>
    <DotfuscatorXamarinCliPath>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\Extensions\PreEmptiveSolutions\DotfuscatorCE\dotfuscatorCLI.exe</DotfuscatorXamarinCliPath>
    <DotfuscatorXamarinConfigFileName>DotfuscatorConfig.xml</DotfuscatorXamarinConfigFileName>
    <DotfuscatorXamarinGenerateNewConfigFile>true</DotfuscatorXamarinGenerateNewConfigFile>
  </PropertyGroup>
  1. <DotfuscatorXamarinEnabled>true</DotfuscatorXamarinEnabled> added to : <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">

  2. <Import Project="..\..\PreEmptive.Dotfuscator.Xamarin.targets" /> inside <Project> tag.

  3. Added after the last </Itemgroup>:<ItemGroup> <None Include="DotfuscatorConfig.xml" /> </ItemGroup>

  4. Build the android project using the Release any CPU configuration.

The app builds successfully without any errors. However, nothing is obfuscated. Also, the DotfuscatorConfig.xml file is created inside the project without any content.

Your help is much appreciated!

Best Answer

Answers

Sign In or Register to comment.