Choose string encryption and method virtualization
Different options protect different parts of a .NET assembly. Identify the code and data you want to make harder to inspect, then test the parts of your app that depend on names or fast execution.
What each option changes
| Option | Target | What to verify |
|---|---|---|
| Renaming | Eligible type and member names | Reflection, JSON or XML serialization, WPF bindings, and plugin discovery |
| String encryption | Eligible string literals written in code | Startup screens, messages, and first access to strings |
| Resource encryption | Eligible embedded assembly resources | Images, forms, localization files, and first load of large resources |
| Method virtualization | Supported methods converted to VM instructions | Calculation results, first call, and repeated-call time |
Start with a known baseline
Balanced protection adds private-type renaming, string encryption, and control-flow changes to compatibility-oriented settings. Run your key workflows with this preset first. Add method virtualization or body protection to selected logic afterward, and repeat the same tests.
- Record the original app's output, startup behavior, and first and repeated-call timings.
- Check the protection report for methods that were transformed or excluded.
- Run the protected build in the intended deployment environment.
- If a feature changes, compare with Compatibility first and reintroduce options one at a time.
Preserve contracts and hot paths
Names used by reflection, serializers, WPF bindings, or plugins may need to stay stable. VM and body protection can add cost on first use; frequently called methods also need repeated-call measurements. Adjust only the affected code with source attributes or project exclusion rules. The full options table describes the scope and limits of each setting.