Examples
A collection of practical use cases and examples that will guide you in straightforwardly integrating Babel Obfuscator into your projects.
General Samples
The examples provided in this section cover various use cases and are not restricted to specific license editions. They can be used by all users regardless of which edition of Babel Obfuscator they have purchased.
Turn an obfuscated stack trace back into the original names, from Babel Desktop or the command line.
Obfuscate a ClickOnce application from Visual Studio, so the published manifests are signed over the protected assemblies.
Check programmatically whether an assembly was obfuscated, and turn a silently unprotected build into a failed one.
Configure Babel for a MAUI application and choose a linker mode that keeps Android and iOS builds working.
Protect a Blazor application, using rules to reach the types generated from Razor pages.
The settings that give the strongest protection for the least effort, and the ones worth avoiding.
Code Encryption
In this section, the examples presented are focused on demonstrating the code encryption feature of Babel Obfuscator.
Encrypt method bodies and execute them inside the managed Babel Virtual Machine, so the IL never appears in the assembly.
Use code encryption passwords to gate features, so a license unlocks the code itself rather than a runtime check.
Cross Assembly Renaming
The following examples demonstrate how to set up and configure cross-assembly renaming with Babel Obfuscator during the build process.
Build Servers Ultimate
These examples integrate Babel Obfuscator into a Continuous Integration pipeline, so every build produces protected assemblies without anyone having to remember a manual step. They all use the Babel Obfuscator NuGet package, which comes with the Ultimate edition and with the Babel Licensing site editions.
The pattern is the same on every build server: host the package on a private feed the agent can read, supply the license from a secret rather than from a file in the repository, and let dotnet build do the obfuscation. What changes is only how each platform names those two things.
Host the package on an Azure Artifacts feed, authenticate with the pipeline identity and pass the license as a secret variable.
Install the package from GitHub Packages and hand Babel the license through a repository secret.
Upload the package to the AppVeyor account feed and keep the feed password in an encrypted variable.
Run the test suite against obfuscated assemblies by feeding the map file back into the test project.
Babel Obfuscator NuGet Ultimate
These samples specifically target the Babel Obfuscator integration using the Babel Obfuscator NuGet package. For the following projects using Babel Obfuscator NuGet packages, an Ultimate license is necessary.