Summary
Disassembles any portable executable (PE) file that contains
intermediate language (IL) code.
- Assembly
- NAnt
.MSNet .dll - Namespace
- NAnt
.MSNet .Tasks - Interfaces
- Base Types
-
- Object
- Element
- Task
- ExternalProgramBase
graph BT
Type-->Base0["ExternalProgramBase"]
click Base0 "/api/NAnt.Core.Tasks/ExternalProgramBase"
Base0-->Base1["Task"]
click Base1 "/api/NAnt.Core/Task"
Base1-->Base2["Element"]
click Base2 "/api/NAnt.Core/Element"
Base2-->Base3["Object"]
Type-.->Interface0["IConditional"]
click Interface0 "/api/NAnt.Core/IConditional"
Type["IldasmTask"]
class Type type-node
Syntax
[TaskName("ildasm")]
[ProgramLocation(LocationType.FrameworkSdkDir)]
public class IldasmTask : ExternalProgramBase, IConditional
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>
Remarks
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
NAnt.MSNet.Tasks.IldasmTask.ForceRebuild
attribute.
A NAnt.Core.Types.FileSet
can be used to select files to disassemble.
To use a NAnt.Core.Types.FileSet
, the NAnt.MSNet.Tasks.IldasmTask.ToDirectory
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".
Attributes
Type | Description |
---|---|
TaskNameAttribute | Indicates that class should be treated as a task. |
Program |
Indicates the location that a task executable can be located in. |
Fields
Name | Constant Value | Summary |
---|---|---|
UnknownExitCode | -1000 |
Defines the exit code that will be returned by
NAnt.Core.Tasks.ExternalProgramBase.ExitCode
if the process could not be started, or did not exit (in time).
Inherited from ExternalProgramBase
static
|
Properties
Name | Value | Summary |
---|---|---|
All | bool |
Specifies whether or not the disassembler should combine the
/HEADER , /BYTE , and /TOKENS options. The default
is false .
|
Arguments | ArgumentCollection |
The command-line arguments for the external program.
|
Assemblies | FileSet |
Specifies a list of PE files to disassemble. To use a
NAnt.Core.Types.FileSet ,
the NAnt.MSNet.Tasks.IldasmTask.ToDirectory attribute must be specified.
|
BaseDirectory | DirectoryInfo |
Gets the working directory for the application.
Inherited from ExternalProgramBase
|
Bytes | bool |
Specifies whether or not the disassembler should generate the
IL stream bytes (in hexadecimal notation) as instruction comments.
The default is
false .
|
CommandLine | string |
Gets the command-line arguments, separated by spaces.
Inherited from ExternalProgramBase
|
CustomXmlProcessing | bool |
Gets a value indicating whether the element is performing additional
processing using the
NAnt.Core.Element.XmlNode that was used to
initialize the element.
Inherited from Element
|
ErrorWriter | TextWriter |
Gets or sets the
System.IO.TextWriter to which error output
of the external program will be written.
Inherited from ExternalProgramBase
|
ExeName | string |
The name of the executable that should be used to launch the
external program.
Inherited from ExternalProgramBase
|
ExitCode | int |
Gets the value that the process specified when it terminated.
Inherited from ExternalProgramBase
|
FailOnError | bool |
Determines if task failure stops the build, or is just reported.
The default is
true .
Inherited from Task
|
ForceRebuild | bool |
Instructs NAnt to rebuild the output file regardless of the file
timestamps. The default is
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 .
|
IfDefined | bool |
If
true then the task will be executed; otherwise,
skipped. The default is true .
Inherited from Task
|
InputFile | FileInfo |
Specifies the PE file to disassemble.
|
Item | string |
Instructs the disassembler to disassemble the specified item only.
|
LineNumbers | bool |
Specifies whether or not the disassembler should include
references to original source lines. The default is
false .
|
Location | Location |
Gets or sets the location in the build file where the element is
defined.
Inherited from Element
|
LogPrefix | string |
The prefix used when sending messages to the log.
Inherited from Task
|
Managed | ManagedExecution |
Specifies whether the external program should be treated as a managed
application, possibly forcing it to be executed under the currently
targeted version of the CLR.
Inherited from ExternalProgramBase
|
Name | string |
The name of the task.
Inherited from Task
|
NamespaceManager | XmlNamespaceManager |
Gets or sets the
System.Xml.XmlNamespaceManager .
Inherited from Element
|
NoIL | bool |
Specifies whether or not the disassembler should suppress ILASM
code output. The default is
false .
|
Output | FileInfo |
Gets the file to which the standard output should be redirected.
Inherited from ExternalProgramBase
|
OutputAppend | bool |
Gets a value indicating whether output will be appended to the
NAnt.Core.Tasks.ExternalProgramBase.Output .
Inherited from ExternalProgramBase
|
OutputFile | FileInfo |
Specifies the name of the output file created by the disassembler.
|
OutputWriter | TextWriter |
Gets or sets the
System.IO.TextWriter to which standard output
messages of the external program will be written.
Inherited from ExternalProgramBase
|
Parent | Object |
Gets or sets the parent of the element.
Inherited from Element
|
ProcessId | int |
Gets the unique identifier for the spawned application.
Inherited from ExternalProgramBase
|
ProgramArguments | string |
Gets the command-line arguments for the external program.
|
ProgramFileName | string |
Gets the filename of the external program to start.
Inherited from ExternalProgramBase
|
Project | Project |
Gets or sets the
NAnt.Core.Element.Project to which this element belongs.
Inherited from Element
|
Properties | PropertyDictionary |
Gets the properties local to this
NAnt.Core.Element and the
NAnt.Core.Element.Project .
Inherited from Element
|
PublicOnly | bool |
Specifies whether or not the disassembler should disassemble
public items only. This is a shortcut for
NAnt.MSNet.Tasks.IldasmTask.Visibility ="pub".
The default is 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 .
|
RawExceptionHandling | bool |
Specifies whether or not the disassembler should generate
structured exception handling clauses in canonical (label) form.
The default is
false .
|
Source | bool |
Specifies whether or not the disassembler should generate
original source lines as comments. The default is
false .
|
Spawn | bool |
Gets or sets a value indicating whether the application should be
spawned. If you spawn an application, its output will not be logged
by NAnt. The default is
false .
Inherited from ExternalProgramBase
|
Threshold | Level |
Gets or sets the log threshold for this
NAnt.Core.Task . By
default the threshold of a task is NAnt.Core.Level.Debug ,
causing no messages to be filtered in the task itself.
Inherited from Task
|
TimeOut | int |
The maximum amount of time the application is allowed to execute,
expressed in milliseconds. Defaults to no time-out.
Inherited from ExternalProgramBase
|
ToDirectory | DirectoryInfo |
Specifies the directory to which outputs will be stored.
|
Tokens | bool |
Specifies whether or not the disassembler should generate metadata
token values as comments. The default is
false .
|
Unicode | bool |
Specifies whether or not the disassembler should use the UNICODE
encoding when generating the output. The default is ANSI.
|
UnlessDefined | bool |
Opposite of
NAnt.Core.Task.IfDefined . If false
then the task will be executed; otherwise, skipped. The default is
false .
Inherited from Task
|
UseRuntimeEngine | bool |
Specifies whether the external program is a managed application
which should be executed using a runtime engine, if configured.
The default is
false .
Inherited from ExternalProgramBase
|
Utf8 | bool |
Specifies whether or not the disassembler should use the UTF-8
encoding when generating the output. The default is ANSI.
|
Verbose | bool |
Determines whether the task should report detailed build log messages.
The default is
false .
Inherited from Task
|
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 + .
|
XmlNode | XmlNode |
Gets or sets the XML node of the element.
Inherited from Element
|
Methods
Name | Value | Summary |
---|---|---|
CopyTo |
void |
Copies all instance data of the
NAnt.Core.Element to a given
NAnt.Core.Element .
Inherited from Element
|
Execute |
void |
Executes the task unless it is skipped.
Inherited from Task
|
ExecuteTask |
void |
Disassembles the PE file(s).
|
Get |
XmlNode |
Locates the XML node for the specified attribute in either the
configuration section of the extension assembly or the.project.
Inherited from Task
|
Get |
XmlNode |
Inherited from Element
|
GetLocation |
Location |
Retrieves the location in the build file where the element is
defined.
Inherited from Element
|
Initialize |
void |
Checks whether the task is initialized with valid attributes.
|
Initialize |
void |
Performs default initialization.
Inherited from Element
|
Initialize |
Element |
Initializes the build element.
Inherited from Element
static
|
InitializeElement |
void |
Derived classes should override to this method to provide extra
initialization and validation not covered by the base class.
Inherited from Element
|
InitializeTask |
void |
Initializes the task.
Inherited from Task
|
Initialize |
void |
Initializes the configuration of the task using configuration
settings retrieved from the NAnt configuration file.
Inherited from Task
|
InitializeXml |
void |
Initializes all build attributes and child elements.
Inherited from Element
|
IsLogEnabledFor |
bool |
Determines whether build output is enabled for the given
NAnt.Core.Level .
Inherited from Task
|
Log |
void |
Logs a message with the given priority.
Inherited from Task
|
Log |
void |
Logs a formatted message with the given priority.
Inherited from Task
|
PrepareProcess |
void |
Updates the
System.Diagnostics.ProcessStartInfo of the specified
System.Diagnostics.Process .
Inherited from ExternalProgramBase
|
StartProcess |
Process |
Starts the process and handles errors.
Inherited from ExternalProgramBase
|