Obfuscate a .NET DLL or EXE for the first time
Start with a small, repeatable test. Keep the original build, run the protected copy on a target machine, and add more protection only after it behaves as expected.
1. Prepare a managed assembly
Use an unprotected managed IL build of software you developed or are authorized to protect. For a .NET 8–11 executable, the managed entry DLL next to the Windows launcher is usually the input. For .NET Framework, select a managed EXE or DLL. Do not feed an already obfuscated or Native AOT binary back into the normal protection workflow.
MyApp.exe and MyApp.dll, inspect the managed MyApp.dll first. The correct choice depends on how your app was published.
2. Run a balanced first job
- Under Input assemblies, add your file. If you add several files, place the main assembly first.
- In Protection options, start with the Balanced protection preset. Make a test list for public APIs, reflection, serialization, and UI bindings.
- Choose an output folder separate from the originals. Use Preview deployment files to see what will be copied.
- Save the settings as a
.cfsprjproject, then start obfuscation and inspect the log.
3. Test the deployment result
The deployment folder contains files to ship; private contains name maps and transformation reports for your own diagnostics. Replace related files from the same protection job together. Your app may still need original configuration files, data, or native dependencies.
| Check | How to test |
|---|---|
| Startup | Compare the original and protected app on the same target machine. |
| Key features | Exercise real paths such as opening files, network calls, and plugin loading. |
| Errors and speed | Inspect logs and measure first use separately from repeated calls. |
If the protected build fails, run the same original through the Compatibility first preset to narrow the cause. See the full first-build manual and the troubleshooting guide.