.netmauiobfuscationobfuscarandroid-obfuscation

Using Obfuscar with MAUI


Is there any guide about using Obfuscar with .NET MAUI?

Which steps should be taken for the obfuscation process to run?

More specifically what code should be added in the .csproj file?


Solution

  • Here is the solution it worked for me.

    I installed both:

    1. Obfuscar Tools for Visual Studio using Visual Studio's Extension Manager
    2. Obfuscar NuGet package using Visual Studio's NuGet Package Manager

    I then copied Obfuscar.Console.exe from %userprofile%\.nuget\packages\obfuscar\2.2.40\tools to %LocalAppData%\Microsoft\VisualStudio\<Visual Studio version>\Extensions\<Obfuscar Extension Folder>\files replacing the extension's .exe file.

    Then I just used the extension and let it generate the files needed. From the Tools menu I chose "Obfuscar Settings" in order to configure the obfuscation parameters. The last step is to visit the Tools menu again and hit "Protect Using Obfuscar".