# Command Line Parameters

Use command-line parameters to protect assemblies, load a project, and configure protection or licensing from your build process.

# Reference overview

Area Includes
General arguments Input, project, logging, keys, and output.
General settings Application behavior, certificates, and assembly handling.
Protection settings Code protection, renaming, resources, and integrity checks.
Lock settings Evaluation limits, license files, and expiration behavior.
Dialog settings Dialog implementation, caption, and colors.
Example combinations Complete command invocations.

Values in square brackets describe the argument to supply. {default} marks the documented default. Use the listed values rather than entering the placeholder text.

# General Arguments

Parameter and value Description
-file [file] Filename of the main assembly.
-icon [file] If you want to use a different icon for an application you need to set the path for the icon here.
-licensed Recommended for production builds. Ensures that protection is performed only when .NET Reactor is running as a licensed full version. If a demo version is detected, no files are protected and .NET Reactor returns exit code 101.
-logfile [file] Writes all important events (successful protection and error messages) into the specified file.
-masterkey [text] Master Key (used ONLY for Lock settings).
-masterkeyfile [file] Path to a Master Key file (used ONLY for Lock settings).
-embed [1\|0] Embed assemblies.
[1] = Enable
[0] = Disable {default}
-merge [1\|0] Merge assemblies.
[1] = Enable
[0] = Disable {default}
-mono [1\|0] Enable this option if your assembly targets Mono.
[1] = Enable
[0] = Disable {default}
-project [file] Path to a .NET Reactor project file (contains the Master Key as well).
-q[uiet] Specifies quiet mode and suppresses the display of success messages
-files [lib/lib] Please define additional files here. If '-embed 1' or '-merge 1' is set, the additional files are embedded into your application or they are directly merged with the main assembly. In case neither '-embed 1' nor '-merge 1' is set the Additional Files (*.dll and *.exe files only) are protected separately.
[library / library] for example "C:\lib1.dll/C:\lib2.dll/C:\lib3.dll"
-snkeypair [file] Strong Name Key Pair file (.snk/.pfx)
-snpassword [text] Strong Name Key Pair file password
-targetfile [file] Target File should be left blank, unless you want to specify the location of the protected output.

# 1. General Settings

# Application behavior

Parameter and value Description
-exception_handling [1\|0] If you don't want your protected application to catch exceptions automatically, set this option to False("0").
[1] = Enable {default}
[0] = Disable
-compression [1\|0] If set to True("1"), .NET Reactor will compress your .exe file and embedded files saving space on disk and bandwidth if you provide your code for internet download.
[1] = Enable {default}
[0] = Disable
-showloadingscreen [1\|0] Enable/Disable the LoadingScreen
[1] = Enable
[0] = Disable {default}
-visualstyles [1\|0] If you wish to use visual styles (which are a feature of Windows Xp and Windows Vista), you will need to set this option to True. If set to false, any attempt in your assembly to enable visual styles will be ineffective.
[1] = Enable
[0] = Disable
-admin [1\|0] If your software requires administrator privileges under Windows Vista/7 you need to set this option to true. In this case a consent dialog is shown in Windows Vista/7.
[1] = Enable
[0] = Disable {default}

# Digital certificate

Parameter and value Description
-pvkfile [file] Private Key File.
-pvkpassword [text] Private Key File Password.
-spcfile [file] Software Publisher Certificate File.

# Assemblies, signing, and output

Parameter and value Description
-merge [1\|0] Merge Assemblies
[1] = Enable
[0] = Disable {default}
-embed [1\|0] Embed Assemblies
[1] = Enable
[0] = Disable {default}
-snkeypair [file] Strong Name Key Pair file (.snk/.pfx)
-snpassword [text] Strong Name Key Pair file password
-targetfile [file] .NET Reactor creates a new file containing your protected assembly. This field allows you to specify the path and name of that file. If left blank, .NET Reactor will write the new file to a default location.

# 2. Protection Settings

# Integrity and decompilation

Parameter and value Description
-antitamp [1\|0] This option prevents your protected assembly from being tampered by hacker tools.
[1] = Enable
[0] = Disable {default}
-antistrong [1\|0] This option enables anti Strong Name removal techniques which prevents your protected assembly from being tampered by hacker tools. Warning, this option can impact the runtime performance of your protected assembly!
[1] = Enable
[0] = Disable {default}
-suppressildasm [1\|0] Enable this option to suppress disassembly to IL using the ildasm.exe tool. Even if this option it set to FALSE your source code is still secure!
[1] = Enable {default}
[0] = Disable

# Code protection

Parameter and value Description
-control_flow_obfuscation [1\|0] Enable "Control Flow Obfuscation" to mangle program flow, making it extremely difficult for humans to follow the program logic. Most decompiler are unable to decompile control flow obfuscated methods.
[1] = Enable
[0] = Disable {default}
-flow_level [1/2/3/4/5/6/7/8/9] This option enables you to control the level of Control Flow Obfuscation. While "1" represents the lowest level of Control Flow Obfuscation, "9" {default} represents the strongest level.
-nativeexe [1\|0] .NET Reactor is able to generate a native x86 EXE file stub for your application. This way it is not possible to directly open your protected application in a decompiler. The decompiler recognizes your protected application as a native EXE file.
[1] = Enable
[0] = Disable {default}
-necrobit [1\|0] Enable this option to use NecroBit protection. NecroBit can be used with both Application and Library protection mode. In Library protection mode an additional file will be created.
[1] = Enable
[0] = Disable {default}
-necrobit_comp [1\|0] If you have problems with reflection on NecroBit protected libraries you should enable this option.
[1] = Enable
[0] = Disable {default}
-prejit [1\|0] In combination with the Native EXE File feature and NecroBit, .NET Reactor is able to convert managed methods into REAL x86 native code. Only methods which doesn't affect the runtime and platform behavior (mostly small methods like property getters/setters...) are converted into native code. By nature this feature has an built-in protection against assembly modification.
[1] = Enable
[0] = Disable {default}

# Obfuscation and public types

Parameter and value Description
-mapping_file [1\|0] Enable Mapping file to create a file which cross reference unobfuscated names with obfuscated ones, which is used by the Stack Trace Deobfuscator.
[1] = Enable
[0] = Disable {default}
-obfuscation [1\|0] Enable this to obfuscate all non public class and member names.
[1] = Enable {default}
[0] = Disable
-incremental_obfuscation [1\|0] If you want .NET Reactor always to generate the same obfuscation strings for your type and member names, you need to enable this option.
[1] = Enable
[0] = Disable {default}
-obfuscate_public_types [1\|0] Enable this to obfuscate all type and member names in an assembly.
[1] = Enable
[0] = Disable {default}
-unprintable_characters [1\|0] Unprintable characters uses unprintable strings to obfuscate type and member names, but cannot be used if your assembly must run as safe code.
[1] = Enable
[0] = Disable {default}
-internalization [1\|0] If enabled, .NET Reactor will convert all public types of an application into internal ones. This way the accessibility of types and members is reduced.
[1] = Enable
[0] = Disable {default}
-internalization_filter [text] Define types you want to keep public or make internal.
Example:
-internalization_filter "[internal];[public][MyAssembly]MyNamespace.;[internal][MyAssembly]MyNamespace2.MyType"

# Renaming exclusions

Parameter and value Description
-exclude_enums [1\|0] Exclusions - Enums
[1] = Enable
[0] = Disable {default}
-exclude_events [1\|0] Exclusions - Events
[1] = Enable
[0] = Disable {default}
-exclude_fields [1\|0] Exclusions - Fields
[1] = Enable
[0] = Disable {default}
-exclude_methods [1\|0] Exclusions - Methods
[1] = Enable
[0] = Disable {default}
-exclude_properties [1\|0] Exclusions - Properties
[1] = Enable
[0] = Disable {default}
-exclude_types [1\|0] Exclusions - Types
[1] = Enable
[0] = Disable {default}
-exclude_serializable_types [1\|0] Disable this option to prevent serializable types from obfuscation.
[1] = Enable
[0] = Disable {default}
-regularexpressions [text] Exclusions - Regular Expressions

# Resources and strings

Parameter and value Description
-resourceencryption [1\|0] Enable this option to compress and encrypt embedded resources.
[1] = Enable
[0] = Disable {default}
-resourcecompression [value] Choose a compression method. 'Fastest' offers poor compression but it is very quick. 'MaxCompression' offers best protection but it is the slowest compression method. 'NoCompression' doesn't apply compression at all.
[nocompression] = No compression will be applied
[fastest] = Offers poor compression but it is very quick
[fast]
[normal] {default}
[good]
[max] = Offers best protection but it is the slowest compression method
Example:
-resourcecompression good
-stringencryption [1\|0] String Encryption disguises internalized text, making it all the more difficult to decipher the interaction of your CIL.
[1] = Enable {default}
[0] = Disable

# 3. Lock Settings

# Combining locks

Parameter and value Description
-licensing_behaviour [1\|0] When set to True("1") causes the expiration of the assembly only when all other enabled locks have expired. When set to False the assembly expires when any one of the locks expires.
[1] = Enable {default}
[0] = Disable

# Evaluation period

Parameter and value Description
-evaluationenable [1\|0] The Evaluation period lock enables the creation of trial versions of your application, limiting the use of your trial in a variety of ways(Trial or Runtime).
[1] = Enable
[0] = Disable {default}
-evaluationtype [trial \| runtime] Choose between Trial and Runtime
[trial] = Trial {default}
[runtime] = Runtime
-time [number] Specify the number of days or minutes for the evaluation period.
-showevaluationperiodscreen [0\|1] Enable this to show a message screen when evaluation period is expired.
-evaluationmessage [text] Evaluation period expired message.

# Expiration date

Parameter and value Description
-expirationdate_enable [1\|0] The Expiration Date lock allows you to specify the exact date on which your application should expire.
[1] = Enable
[0] = Disable {default}
-expirationdate [y/m/d] Choose a day. Your inbuilt license will be valid up to this day. After this day your customer will need a new license file.[year/month/day] for example '2023/1/15'
-showexpirationdatescreen [1\|0] Specifies whether a dialog box should be displayed to the user when the Expiration Date is reached.
-expirationdatemessage [text] Message

# Number of uses

Parameter and value Description
-number_of_uses_enable [1\|0] This lock, if enabled, causes your application to expire after the specified number of uses.
[1] = Enable
[0] = Disable {default}
-number_of_uses [number] Specify the number of times the user can run your application before it expires.
-showenumberofusesscreen [1\|0] Specifies whether a dialog box should be displayed to the user when your application has been used the specified number of times.
[1] = Enable {default}
[0] = Disable
-expirationdatemessage [text] Message

# License files and loading

Parameter and value Description
-shownotfoundscreen [1\|0] Enable/Disable Screen
[1] = Enable {default}
[0] = Disable
-invalidlicensemessage [text] The text of the message which is issued when a license file is not found (if "Run Without License" is set to false), is found but is corrupt or otherwise invalid.
-run_without_licensefile [1\|0] Set to false(0) to require a valid license for operation. If true, enabled Inbuilt Locks are honored. If a valid license file is found the Inbuilt Locks settings are overriden with the license file settings.
[1] = Enable {default}
[0] = Disable
-staticlicensefilename [filename] Specifies a license file name or extension (*.myextension). Leave blank to allow .NET Reactor to determine a *.license file name from your assembly name. To avoid conflicts with optional methods of extending license behavior, binary .NET Reactor licenses do not use the .LIC extension reserved to .NET license classes.
-v3mode [1\|0] .NET Reactor v3.x uses a new encryption technique which is not backward compatible with previous versions of .NET Reactor. Set this option to True to use .NET Reactor v3 license encryption technique, or False to use the V2.x compatible encryption method.

# Concurrent instances

Parameter and value Description
-number_of_instances_enable [1\|0] The max number of instances lock allows you to specify the maximum number of copies of your application the user is allowed to start at the same time. Please note that exceeding the specified number of instances does NOT cause your application to expire.
[1] = Enable
[0] = Disable {default}
-number_of_instances [number] The maximum number of instances.
-numberofinstancesscreen [1\|0] Specifies whether a dialog box should be displayed to the user when they attempt to run more than the specified number of instances of your application.
[1] = Enable {default}
[0] = Disable
-numberofinstancesmessage [text] Message

# Nag screen

Parameter and value Description
-shownagscreen [1\|0] Enable/Disable NagScreen
[1] = Enable
[0] = Disable {default}
-nagmessage [text] Here you can set the message for the nag screen.
-xdays [number] .NET Reactor can either display the nag screen every time the application is started (in which case set the value of this option to -1{default}), or a specified number of days before the end of the Evaluation Period or Expiry Date.

# Actions after expiration

Parameter and value Description
-run_another_process [text] Opens or launches another application, file, or web site upon expiration. Usually used to send evaluation users to a web page.
-shutdown_process [1\|0] Terminates the running process upon expiration.
[1] = Enable {default}
[0] = Disable

# 4. Dialog Settings

Parameter and value Description
-dialogbox_interface [file] Uses a customizable dialog box you may build with the SDK. Please set the FullName of your Dialog Box here(e.g. MyNamespace.MyDialogBox). Please check the SDK for more information.
-messagecaption [text] This is the title of all message forms which can be shown.
-gradcolorbegin [r/g/b] Gradient Color of the message windows.<red/green/blue> for example '212/15/128'
-gradcolorend [r/g/b] Gradient Color of the message windows.<red/green/blue> for example '212/15/128'

# Example Combinations

The following commands demonstrate the original combinations for assemblies, projects, keys, and trial settings.

dotNET_Reactor.Console.exe -file "c:\testapp.exe"

dotNET_Reactor.Console.exe -file "c:\testlib.dll" -licensed

dotNET_Reactor.Console.exe -project "c:\projx.nrproj"

dotNET_Reactor.Console.exe -project "c:\projx.nrproj" -masterkeyfile "c:\masterkey.mkey"

dotNET_Reactor.Console.exe -file "c:\testapp.exe" -project "c:\projx.nrproj"

dotNET_Reactor.Console.exe -file "c:\testapp.exe" -project "c:\projx.nrproj" -q -licensed

dotNET_Reactor.Console.exe -file "c:\testapp.exe" -evaluationenable 1 -evaluationtype trial -time 14

dotNET_Reactor.Console.exe -file "c:\testapp.exe" -showloadingscreen 0

# Related topics

Build Integration Manager · Main panel settings