8.5. Command-Line Interface
Eazfuscator.NET can be used from the command line. Although this is an uncommon usage pattern it can be useful in some scenarios.
The command-line interface of Eazfuscator.NET can be accessed by issuing eazfuscator.net command at the command line. The product installer registers Eazfuscator.NET's installation directory within PATH
environment variable making eazfuscator.net command universally available from any location on the file system.
8.5.1. Options
The full list of available options is presented below (it can be retrieved by running eazfuscator.net --help command in the command line):
Usage: eazfuscator.net [options] <input file 1> [input file 2] ...
Generic options:
-? [ --help ] Produce detailed help message for available options.
--version Print version string.
-n [ --no-logo ] Suppress logo message.
Configuration options:
-o [ --output ] arg Put obfuscated assembly to the specified output file. If this option is not specified then output assembly
overwrites the input file. The option cannot be specified when multiple input files are given.
-k [ --key-file ] arg If this option is specified then obfuscated assembly will be signed with a key from specified file.
PLEASE NOTE: obfuscated assembly that had a strong name before obfuscation MUST BE resigned to work properly;
otherwise it will not be able to load. Also note that only assemblies with strong name can be resigned -
assemblies without strong name are not affected.
-c [ --key-container ] arg If this option is specified then obfuscated assembly will be signed with a key from specified container.
This option cannot be used with 'key-file' option.
-q [ --quiet ] Do not print any information and diagnostic messages.
Advanced features:
--decode-stack-trace Decodes encrypted stack trace.
--error-sandbox arg Runs an application given as the argument in the exception sandbox. Every unhandled exception is caught by sandbox
environment. This feature is useful when obfuscated application cannot be started and bails out with the default
unexpected error window.
--ensure-obfuscated Checks the input files and ensures they are obfuscated.
Integration options:
--msbuild-project-path arg MSBuild project path.
--msbuild-project-configuration arg MSBuild project configuration name.
--msbuild-project-platform arg MSBuild project platform name.
--msbuild-solution-path arg MSBuild solution path.
--protect-project Protect project. Project is obfuscated by Eazfuscator.NET on every build when protection is active.
This option should be used with 'msbuild-project-path' option.
--unprotect-project Remove project protection. This option should be used with 'msbuild-project-path' option.
Compatibility options:
-v [ --compatibility-version ] arg A version of Eazfuscator.NET to be compatible with.
--check-version Checks the version of Eazfuscator.NET and returns the result as exit code. This option cannot be
combined with other options. (To get more help, please try to use it)
Code generation options:
--deterministic Produce byte-for-byte equivalent output from the same input.
Advanced configuration options:
--probing-paths arg Probing paths separated by semicolon.
--warnings-as-errors arg A list of warnings to treat as errors separated by comma. Example:
--warnings-as-errors EF-4001,EF-4002
To treat all warnings as errors, specify 'all':
--warnings-as-errors all
--configuration-file arg Configuration file in C# or VB.NET format with a list of assembly attributes for obfuscation. Please refer to
documentation for configuration syntax.
-s [ --statistics ] Produce obfuscation statistics report.
--newline-flush Flushes output messages with new line (CR/LF) symbols. This option is useful when integrating with third-party
IDEs.
8.5.2. Environment Variables
A command-line option can be alternatively specified by an environment variable. For example, [ --compatibility-version 2020.1
] command-line parameter can be specified as EAZFUSCATOR_NET_COMPATIBILITY_VERSION=2020.1
environment variable.