al.exe takes as its input one or more files that are either in MSIL format or are resource files and outputs a file with an assembly manifest.
All Visual Studio compilers produce assemblies. However, if you have one or more modules (metadata without a manifest) you can use al.exe to create an assembly, although, the manifest will be in a separate file.
al file[,targetfile] /embedresource:file[,name[,Y | N]] /linkresource:file[,name[,targetfile] options
where:
name is an internal ID for the resource. By specifying Y, you allow the resource to be visible to other assemblies. The default is N, not visible to other assemblies.
If the only files passed to al.exe are resource files, the output file is a satellite resource assembly.
name is an internal ID for the resource. targetfile, lets you specify a path and filename into which al.exe will copy file and then begin the compilation. By specifying Y, you allow the resource to be visible to other assemblies. The default is N, not visible to other assemblies.
If the only files passed to al.exe are resource files, the output file is a satellite resource assembly.
al.exe Option | Description |
---|---|
/algid:id | Specifies an algorithm to use to hash all files in a multifile assembly, other than the file containing the assembly manifest. By default, CALG_SHA1 is used. See wincrypt.h for other predefined algorithms.
The hash values are stored in the file table of the assembly manifest. At installation and load time, the files will be checked against their hashes. This option can also be specified as a custom attribute (System.Runtime.CompilerServices.AssemblyAlgIDAttribute) in the source code for any MSIL module. |
/baseaddress:addr | Specifies the address at which a DLL will be loaded on the user's computer at run time. If an application loads several DLLs, the application can load faster if you specify the base address of DLLs rather than let the operating system relocate the DLLs in the process space.
The short form of this option is /base:addr. |
/bugreport:filename | Create a file (filename) that contains information that makes it easy to report a bug. |
/company:text | Specifies a string for the Company field in the assembly. Place the string in double quotation marks if text contains a space. This string is a custom attribute on the assembly and is available for viewing with Reflection.
If /win32res is not specified, text will appear in Windows Explorer as the Company property for the file. If /win32res is specified, the company information in the specified resource file is what will display as the Company property in Windows Explorer. This option can also be specified as a custom attribute (System.Reflection.AssemblyCompanyAttribute) in the source code for any MSIL module. The short form of this option is /comp:"text". |
/configuration:text | Specifies a string for the Configuration field in the assembly. Place the string in double quotation marks if text contains a space. This string is a custom attribute on the assembly and is available for viewing with Reflection.
This option can also be specified as a custom attribute (System.Reflection.AssemblyConfigurationAttribute) in the source code for any MSIL module. The short form of this option is /config:text. |
/copyright:text | Specifies a string for the Copyright field in the assembly. Place the string in double quotation marks if text contains a space. This string is a custom attribute on the assembly and is available for viewing with Reflection.
If /win32res is not specified, text will appear in Windows Explorer as the Copyright property for the file. If /win32res is specified, the company information in the specified resource file is what will display as the Copyright property in Windows Explorer. This option can also be specified as a custom attribute (System.Reflection.AssemblyCopyrightAttribute) in the source code for any MSIL module. The short form of this option is /copy:text. |
/culture:text | Specifies the culture string to associate with the assembly. Valid values for cultures are those defined by RFC1766.
Place the string in double quotation marks if text contains a space. There is no default culture string. This string is available for viewing with Reflection. For information on valid text strings, see CultureInfo class. This option can also be specified as a custom attribute (System.Runtime.CompilerServices.AssemblyCultureAttribute) in the source code for any MSIL module. The short form of this option is /c:text. |
/delaysign[+|-] | Specifies whether the assembly will be fully or partially signed. Use /delaysign- if you want a fully signed assembly, which contains both public and private keys. Use /delaysign+ if you only want the public key placed in the assembly.
The default is /delaysign-. /delaysign has no effect unless used with /keyfile or /keyname. If you use /delaysign+, it will, for example, allow a tester to put the assembly into the global cache. After testing, you can then fully sign the assembly (place the private key into the assembly). This option can also be specified as a custom attribute (System.Runtime.CompilerServices.AssemblyDelaySignAttribute) in the source code for any MSIL module. The short form of this option is /delay[+|-]. |
/description:text | Specifies a string for the Description field in the assembly. Place the string in double quotation marks if text contains a space. This string is a custom attribute on the assembly and is available for viewing with Reflection.
If /win32res is not specified, text will appear in Windows Explorer as the Description property for the file. If /win32res is specified, the company information in the specified resource file is what will display as the Description property in Windows Explorer. This option can also be specified as a custom attribute (System.Reflection.AssemblyDescriptionAttribute) in the source code for any MSIL module. The short form of this option is /descr:text. |
/flags:flags | (This feature is not implemented for the PDC release.)
Specifies a value for the Flags field in the assembly. Possible values for flags are:
This option can also be specified as a custom attribute (System.Runtime.CompilerServices.AssemblyFlagsAttribute) in the source code for any MSIL module. |
/fullpaths | Causes al.exe to specify the absolute path for any files that are reported in an error message. |
/help | Displays the available command line options.
The short form of this option is /?. |
/install[:filename] | Installs the assembly into the global assembly cache. Use /install if you will not install the application with Microsoft Installer (MSI).
If you are not using MSI, you can use /install to test a program. To use /install, /keyfile or /keyname must also be specified. If /out is also specified, do not specify filename. The short form of this option is /i[:filename]. |
/keyfile:filename | Specifies a file (filename) containing a key pair to make a shareable component. The compiler inserts the public key into the assembly manifest and then signs the final assembly with the private key. Use sn -k file (at the command line) to generate a key file. Then, use sn -i to install the key pair into the key container
If you are delay signing, this file will likely just have the public key and not the private key. The key information appears in the Originator Blob field of the assembly. This option can also be specified as a custom attribute (System.Runtime.CompilerServices.AssemblyKeyFileAttribute) in the source code for any MSIL module. The short form of this option is /keyf:filename. |
/keyname:text | Specifies a container containing a key pair to make a shareable component by inserting a public key into the assembly manifest and then signs the final assembly with the private key. Use sn -k file (at the command line) to generate a key file.
Place the string in double quotation marks if text contains a space. The key information appears in the Originator Blob field of the assembly. Place text in double quotation marks (" ") if there is an embedded space. This option can also be specified as a custom attribute (System.Runtime.CompilerServices.AssemblyKeyNameAttribute) in the source code for any MSIL module. The short form of this option is /keyn:text. |
/main:method | Specifies the fully-qualified name (class.method) of the method to use as an entry point when converting a module to an executable file. |
/nologo | Suppresses the banner. |
/os:os.maj.min | Specifies an operating system and its major version and minor version. This information could represent an operating system on which the file is supported. Currently, the runtime does not use this information.
It is possible to specify more than one /os option in a single compilation. This could indicate that more than one operating system supports the file. The operating system, major version, and minor version should be specified in hexadecimal. Values for operating system should come from the This option can also be specified as a custom attribute (System.Runtime.CompilerServices.AssemblyOperatingSystemAttribute) in the source code for any MSIL module. |
/out:filename | Specifies the name of the file output by al.exe. |
/processor:proc | Specifies the processor(s) supporting this file. proc is the hexadecimal value for a processor. See the PROCESSOR_* entries in winnt.h for a list of processor types.
Currently, the runtime does not use this information. It is possible to specify more than one /processor option in a single compilation. This could indicate that more than one processor supports the file. This option can also be specified as a custom attribute (System.Runtime.CompilerServices.AssemblyProcessorAttribute) in the source code for any MSIL module. The short form of this option is /proc: proc. |
/product:text | Specifies a string for the Product field in the assembly. Place the string in double quotation marks if text contains a space. This string is a custom attribute on the assembly and is available for viewing with Reflection.
If /win32res is not specified, text will appear in Windows Explorer as the Product property for the file. If /win32res is specified, the company information in the specified resource file is what will display as the Product property in Windows Explorer. This option can also be specified as a custom attribute (System.Reflection.AssemblyProductAttribute) in the source code for any MSIL module. The short form of this option is /prod:text. |
/productversion:text | Specifies a string for the Product Version field in the assembly. Place the string in double quotation marks if text contains a space. This string is a custom attribute on the assembly and is available for viewing with Reflection.
If /productversion is not specified, /version:version will appear in Windows Explorer as the Product Version property for the file. This option can also be specified as a custom attribute (System.Reflection.AssemblyInformationalVersionAttribute) in the source code for any MSIL module. The short form of this option is /productv:text. |
/type:lib|exe|win | Specifies the file format of the output file: lib (code library), exe (console application), or win (Windows application). The default is lib.
The short form of this option is /t:lib|exe|win. |
/title:text | Specifies a string for the Title field in the assembly. Place the string in double quotation marks if text contains a space. This string is a custom attribute on the assembly and is available for viewing with Reflection.
If /win32res is not specified, text will appear in Windows Explorer as the Title property for the file. If /win32res is specified, the company information in the specified resource file is what will display as the Title property in Windows Explorer. This option can also be specified as a custom attribute (System.Reflection.AssemblyTitleAttribute) in the source code for any MSIL module. |
/trademark:text | Specifies a string for the Trademark field in the assembly. Place the string in double quotation marks if text contains a space. This string is a custom attribute on the assembly and is available for viewing with Reflection.
If /win32res is not specified, text will appear in Windows Explorer as the Trademark property for the file. If /win32res is specified, the company information in the specified resource file is what will display as the Trademark property in Windows Explorer. This option can also be specified as a custom attribute (System.Reflection.AssemblyTrademarkAttribute) in the source code for any MSIL module. The short form of this option is /trade:text. |
/version:version | Specifies version information for this assembly. The format of the version string is major.minor.revision.build. The default value is 0.
If you do specify /version, you have to at least specify major. If you specify major and minor, you can specify an asterisk (*)for revision. This will cause revision to be equal to the number of days since January 1, 2000, local time and for build to be equal to the number of seconds since midnight, local time, modulo 2. If you specify major, minor, and revision, you can specify an asterisk for build. This will cause build to be equal to the number of seconds since midnight, local time, modulo 2. This option can also be specified as a custom attribute (System.Runtime.CompilerServices.AssemblyVersionAttribute) in the source code for any MSIL module. The short form of this option is /v:version. |
/win32icon:filename | Inserts a .ico file, which gives the output file the desired appearance in the Windows Explorer, into the assembly. |
/win32res:filename | Inserts a Win32 resource (.res file) in the output file. A Win32 resource file can be created with the Resource Compiler. The Resource Compiler is invoked when you compile a Visual C++ program; a .res file is created from the .rc file. |
@filename | Specifies a response file. A response file contains al.exe commands.
Commands in filename can appear one per line or on the same line separated by one or more spaces. |
Create an executable file t2a.exe
with an assembly from the t2.dll
module. The entry point is the Main
method in MyClass
.
al t2.dll /type:exe /out:t2a.exe /main:MyClass.Main