Choosing protection options

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

OptionTargetWhat to verify
RenamingEligible type and member namesReflection, JSON or XML serialization, WPF bindings, and plugin discovery
String encryptionEligible string literals written in codeStartup screens, messages, and first access to strings
Resource encryptionEligible embedded assembly resourcesImages, forms, localization files, and first load of large resources
Method virtualizationSupported methods converted to VM instructionsCalculation results, first call, and repeated-call time
Conceptual diagram of string and resource protection
Strings and embedded resources are separate protection targets.
Conceptual diagram of method virtualization
VM protection applies to supported methods; measure its runtime cost.

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.

  1. Record the original app's output, startup behavior, and first and repeated-call timings.
  2. Check the protection report for methods that were transformed or excluded.
  3. Run the protected build in the intended deployment environment.
  4. If a feature changes, compare with Compatibility first and reintroduce options one at a time.
String encryption covers eligible literals in your code. It does not automatically conceal server secrets or every value packed into a release. Use the report and actual output files to confirm coverage.

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.

User manual