Summary
Wraps al.exe, the assembly linker for the .NET Framework.
- Assembly
- NAnt
.DotNet .dll - Namespace
- NAnt
.DotNet .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["AssemblyLinkerTask"]
class Type type-node
Syntax
[TaskName("al")]
[ProgramLocation(LocationType.FrameworkDir)]
public class AssemblyLinkerTask : ExternalProgramBase, IConditional
Examples
Create a library containing all icon files in the current directory.
<al output="MyIcons.dll" target="lib">
<sources>
<include name="*.ico" />
</sources>
</al>
Create an executable assembly manifest from modules.
<al output="Client.exe" target="exe" main="Program.Main">
<modules>
<include name="Client.netmodule" />
<include name="Common.netmodule" />
</modules>
</al>
Remarks
All specified sources will be embedded using the /embed
flag.
Other source types are not supported.
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 |
---|---|---|
AlgorithmID | string |
Specifies an algorithm (in hexadecimal) to hash all files in a
multifile assembly except the file that contains the assembly
manifest. The default algorithm is CALG_SHA1.
|
Arguments | ArgumentCollection |
The command-line arguments for the external program.
Inherited from ExternalProgramBase
|
BaseDirectory | DirectoryInfo |
Gets the working directory for the application.
Inherited from ExternalProgramBase
|
CommandLine | string |
Gets the command-line arguments, separated by spaces.
Inherited from ExternalProgramBase
|
Company | string |
Specifies a string for the Company field in the assembly.
|
Configuration | string |
Specifies a string for the Configuration field in the assembly.
|
Copyright | string |
Specifies a string for the Copyright field in the assembly.
|
Culture | string |
The culture string associated with the output assembly.
The string must be in RFC 1766 format, such as "en-US".
|
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
|
DelaySign | DelaySign |
Specifies whether the assembly should be partially signed. The default
is
NAnt.DotNet.Types.DelaySign.NotSet .
|
Description | string |
Specifies a string for the Description field in the assembly.
|
EmbeddedResources | Embedded |
The set of compiled resources to embed.
|
ErrorWriter | TextWriter |
Gets or sets the
System.IO.TextWriter to which error output
of the external program will be written.
Inherited from ExternalProgramBase
|
EvidenceFile | FileInfo |
Security evidence file to embed.
|
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
|
FileVersion | string |
Specifies a string for the File Version field in the assembly.
|
Flags | string |
Specifies a value (in hexadecimal) for the Flags field in
the assembly.
|
IfDefined | bool |
If
true then the task will be executed; otherwise,
skipped. The default is true .
Inherited from Task
|
KeyContainer | string |
Specifies a container that holds a key pair.
|
KeyFile | FileInfo |
Specifies a file (filename) that contains a key pair or
just a public key to sign an assembly.
|
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
|
MainMethod | string |
Specifies the fully-qualified name (class.method) of the method to
use as an entry point when converting a module to an executable file.
|
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
|
ModuleSet | ModuleSet |
One or more modules to be compiled into an assembly.
|
Name | string |
The name of the task.
Inherited from Task
|
NamespaceManager | XmlNamespaceManager |
Gets or sets the
System.Xml.XmlNamespaceManager .
Inherited from Element
|
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 |
The name of the output file for the assembly manifest.
|
OutputTarget | string |
The target type (one of
lib , exe , or winexe ).
|
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
|
Product | string |
Specifies a string for the Product field in the assembly.
|
ProductVersion | string |
Specifies a string for the Product Version field in the assembly.
|
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
|
Resources | FileSet |
The set of resources to embed.
|
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
|
SupportsTemplate | bool |
Indicates whether the assembly linker for a given target framework
supports the "template" option, which takes an assembly from which
to get all options except the culture field.
The default is
true .
|
TemplateFile | FileInfo |
Specifies an assembly from which to get all options except the
culture field.
|
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
|
Title | string |
Specifies a string for the Title field in the assembly.
|
Trademark | string |
Specifies a string for the Trademark field in the assembly.
|
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
|
Verbose | bool |
Determines whether the task should report detailed build log messages.
The default is
false .
Inherited from Task
|
Version | string |
Specifies version information for the assembly. The format of the
version string is
major .minor .build .revision .
|
Win32Icon | FileInfo |
Icon to associate with the assembly.
|
Win32Res | FileInfo |
Inserts a Win32 resource (.res file) in the output file.
|
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 |
Generates an assembly manifest.
|
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 |
Initializes the task.
Inherited from Task
|
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
|
NeedsCompiling |
bool |
Determines whether the assembly manifest needs compiling or is
uptodate.
|
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
|