# <ildasm>

Disassembles any portable executable (PE) file that contains intermediate language (IL) code.

Files are only disassembled if the input file is newer than the output file, or if the output file does not exist. However, you can explicitly force files to be disassembled with the `rebuild` attribute.

A <fileset> can be used to select files to disassemble. To use a <fileset>, the `todir` attribute must be set. The file name of the output file will be equal to the file name of the input file, but with extension ".il".

### Parameters

Attribute | Type | Description | Required
--- | --- | --- | ---
all | bool | Specifies whether or not the disassembler should combine the `/HEADER`, `/BYTE`, and `/TOKENS` options. The default is false. | False
bytes | bool | Specifies whether or not the disassembler should generate the IL stream bytes (in hexadecimal notation) as instruction comments. The default is false. | False
header | bool | Specifies whether or not the disassembler should include PE header information and runtime header information in the output. The default is false. | False
input | file | Specifies the PE file to disassemble. | False
item | string | Instructs the disassembler to disassemble the specified item only. | False
linenumbers | bool | Specifies whether or not the disassembler should include references to original source lines. The default is false. | False
noil | bool | Specifies whether or not the disassembler should suppress ILASM code output. The default is false. | False
output | file | Specifies the name of the output file created by the disassembler. | False
publiconly | bool | Specifies whether or not the disassembler should disassemble public items only. This is a shortcut for `visibility`="pub". The default is false. | False
quoteallnames | bool | Specifies whether or not the disassembler should enclose all names in single quotation marks. By default, only names that don't match the ILASM definition of a simple name are quoted. The default is false. | False
rawexceptionhandling | bool | Specifies whether or not the disassembler should generate structured exception handling clauses in canonical (label) form. The default is false. | False
rebuild | bool | Instructs NAnt to rebuild the output file regardless of the file timestamps. The default is false. | False
source | bool | Specifies whether or not the disassembler should generate original source lines as comments. The default is false. | False
todir | directory | Specifies the directory to which outputs will be stored. | False
tokens | bool | Specifies whether or not the disassembler should generate metadata token values as comments. The default is false. | False
unicode | bool | Specifies whether or not the disassembler should use the UNICODE encoding when generating the output. The default is ANSI. | False
utf8 | bool | Specifies whether or not the disassembler should use the UTF-8 encoding when generating the output. The default is ANSI. | False
visibility | string | Instructs the disassembler to disassemble only the items with the specified visibility. Possible values are `PUB`, `PRI`, `FAM`, `ASM`, `FAA`, `FOA`, `PSC`, or any combination of them separated by `+`. | False
failonerror | bool | Determines if task failure stops the build, or is just reported. The default is true. | False
if | bool | If true then the task will be executed; otherwise, skipped. The default is true. | False
timeout | int | The maximum amount of time the application is allowed to execute, expressed in milliseconds. Defaults to no time-out. | False
unless | bool | Opposite of `if`. If false then the task will be executed; otherwise, skipped. The default is false. | False
verbose | bool | Determines whether the task should report detailed build log messages. The default is false. | False

### Framework-configurable parameters

Attribute | Type | Description | Required
--- | --- | --- | ---
exename | string | The name of the executable that should be used to launch the external program. | False
useruntimeengine | bool | Specifies whether the external program should be executed using a runtime engine, if configured. The default is false. | False

### Nested Elements:

#### <assemblies>

Specifies a list of PE files to disassemble. To use a <fileset>, the `todir` attribute must be specified.

#### </assemblies>

### Examples

- Disassembles `helloworld.exe` to `helloworld.il`.

      <ildasm input="helloworld.exe" output="helloworld.il" />

- Disassembles a set of PE files into the specified directory.

      <ildasm todir=".">
          <assemblies>
              <include name="*.exe" />
              <include name="*.dll" />
          </assemblies>
      </ildasm>

### Requirements

Assembly: NAnt.MSNetTasks (0.85.2478.0)