You are on page 1of 2

ILSpy Command Line Arguments

Command line arguments can be either options or file names.


If an argument is a file name, the file will be opened as assembly and added to
the current assembly list.
Available options:
/singleInstance
nce

If ILSpy is already running, activates the existing insta


and passes command line arguments to that instance.
This is the default value if /list is not used.

/separate
running.

Start up a separate ILSpy instance even if it is already

/noActivate
has no effect

Do not activate the existing ILSpy instance. This option


if a new ILSpy instance is being started.

/list:listname
itially.

Specifies the name of the assembly list that is loaded in


When this option is not specified, ILSpy loads the previo

usly opened list.


Specify "/list" (without value) to open the default list.
When this option is used, ILSpy will activate an existing
instance
only if it uses the same list as specified.
[Note: Assembly Lists are not yet implemented]
/clearList
emblies.

Clears the assembly list before loading the specified ass


[Note: Assembly Lists are not yet implemented]

/navigateTo:tag

Navigates to the member specified by the given ID string.


The member is searched for only in the assemblies specifi

ed on the command line.


Example: 'ILSpy ILSpy.exe /navigateTo:T:ICSharpCode.ILSpy
.CommandLineArguments'
The syntax of ID strings is described in appendix A of th
e C# language specification.
/language:name

Selects the specified language.


Example: 'ILSpy /language:C#' or 'ILSpy /language:IL'

WM_COPYDATA (SendMessage API):


ILSpy can be controlled by other programs that send a WM_COPYDATA message to
its main window.
The message data must be an Unicode (UTF-16) string starting with "ILSpy:\r\
n".
All lines except the first ("ILSpy:") in that string are handled as commandline arguments.
There must be exactly one argument per line.
That is, by sending this message:
ILSpy:
C:\Assembly.dll
/navigateTo:T:Type

The target ILSpy instance will open C:\Assembly.dll and navigate to the spec
ified type.
ILSpy will return TRUE (1) if it handles the message, and FALSE (0) otherwis
e.
The /separate option will be ignored; WM_COPYDATA will never start up a new
instance.
The /noActivate option has no effect, sending WM_COPYDATA will never activat
e the window.
Instead, the calling process should use SetForegroundWindow().
If you use /list with WM_COPYDATA, you need to specify /singleInstance as we
ll, otherwise
ILSpy will not handle the message if it has opened a different assembly list
.

You might also like