Al.exe (Assembly Linker)
The Assembly Linker generates a file that has an assembly manifest from one or more files that are either modules or resource files. A module is an intermediate language (IL) file that does not have an assembly manifest.
Note
Starting with Visual Studio 2008, both the C# and Visual Basic compilers automatically embed a Win32 manifest into the assembly. For more information, see -win32manifest (C# Compiler Options).
This tool is automatically installed with Visual Studio. To run the tool, use Visual Studio Developer Command Prompt or Visual Studio Developer PowerShell.
At the command prompt, type the following:
Syntax
al sources options
Parameters
You can specify one or more of the following sources
.
Source | Description |
---|---|
file [,target ] |
Copies the contents of file (a module) to the file name specified by target . After copying, Al.exe compiles target into an assembly. |
/embed[resource]: file [,name [,private ]] |
Embeds the resource specified by file in the image that contains the assembly manifest; Al.exe copies the contents of file into the portable executable (PE) image.The name parameter is an internal identifier for the resource. By default, resources are public in the assembly (visible to other assemblies). Specifying private makes the resource not visible to other assemblies.If file is a .NET Framework resource file created, for example, by the Resource File Generator (Resgen.exe) or in the development environment, it can be accessed with members in the System.Resources. For more information, see ResourceManager. For all other resources, use the GetManifestResource* methods in the Assembly to access the resource at run time.If only resource files are passed to Al.exe, the output file is a satellite resource assembly. |
/link[resource]: file [,name [,target [,private ]]] |
Links a resource file to an assembly. The resource specified by file becomes part of the assembly; the file is not copied. The file parameter can be in any file format. For example, you can specify a native DLL as the file parameter. This will make the native DLL part of the assembly so that it can be installed into the global assembly cache and accessed from managed code in the assembly. You can also do this by using the /linkresource compiler option. For more information, see -linkresource (C# Compiler Options).The name parameter is an internal identifier for the resource. The target parameter specifies a path and file name into which Al.exe copies the file . After copying, Al.exe compiles target into an assembly. By default, resources are public in the assembly (visible to other assemblies). Specifying private makes the resource not visible to other assemblies.If file is a .NET Framework resource file created, for example, by the Resource File Generator (Resgen.exe) or in the development environment, it can be accessed with members in the System.Resources namespace. For more information, see ResourceManager. For all other resources, use the GetManifestResource* methods in the Assembly class to access the resource at run time.If only resource files are passed to Al.exe, the output file is a satellite resource assembly. |
You can specify the following options
; you must specify /out.
Option | Description |
---|---|
/algid: id |
Specifies an algorithm to hash all files in a multifile assembly except the file that contains the assembly manifest. The default algorithm is CALG_SHA1. See ALG_ID in the Platform SDK documentation for other algorithms. For the first release of the .NET Framework, only CALG_SHA1 and CALG_MD5 are valid. The hash values are stored in the file table of the assembly manifest. At installation and load time, the assembly's files are checked against their hashes. You can also specify this option as a custom attribute (AssemblyAlgorithmIdAttribute) in the source code for any module. |
/base[address]: addr |
Specifies the address at which a DLL will be loaded on the user's computer at run time. Applications load faster if you specify the base address of the DLLs, instead of letting the operating system relocate the DLLs in the process space. |
/bugreport: filename |
Creates a file (filename ) that contains information for reporting bugs. |
/comp[any]: 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 you do not specify /win32res, text appears in File Explorer as the Company property for the file. If you specify /win32res, the company information in the specified resource file appears as the Company property in File Explorer.If text is an empty string (""), the Win32 Company resource appears as a single space.If you specify /win32res, /company will not affect the Win32 resource information. You can also specify this option as a custom attribute (AssemblyCompanyAttribute) in the source code for any CIL module. |
/config[uration]: 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.If text is an empty string, the Win32 Configuration resource appears as a single space. You can also specify this option as a custom attribute (AssemblyConfigurationAttribute) in the source code for any CIL module. |
/copy[right]: 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 you do not specify /win32res, /copyright appears in File Explorer as the Win32 Copyright resource. If text is an empty string, the Win32 Copyright resource appears as a single space. If you specify /win32res, /copyright will not affect the Win32 resource information. You can also specify this option as a custom attribute (AssemblyCopyrightAttribute) in the source code for any CIL module. |
/c[ulture]: text |
Specifies the culture string to associate with the assembly. Valid values for cultures are those defined by the Internet Requests for Comments (RFC) document 1766 titled "Tags for the Identification of Languages." 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 about valid text strings, see the CultureInfo.You can also specify this option as a custom attribute (AssemblyCultureAttribute) in the source code for any CIL module. |
/delay[sign][+ or -] |
Specifies whether the assembly will be fully or partially signed. Use /delaysign- if you want a fully signed assembly. Use /delaysign+ if you only want to include the public key in the assembly. When you request a fully signed assembly, Al.exe hashes the file that contains the manifest (assembly metadata) and signs that hash with the private key. The resulting digital signature is stored in the file that contains the manifest. When an assembly is delay signed, Al.exe does not compute and store the signature, but just reserves space in the file so the signature can be added later. The default is /delaysign-. The /delaysign option has no effect unless used with /keyfile or /keyname. For example, using /delaysign+ enables a tester to put the assembly in the global cache. After testing, you can fully sign the assembly by including the private key in the assembly. Note: Before using the Gacutil.exe (Global Assembly Cache Tool) to put a delay-signed assembly into the global cache, use the Sn.exe (Strong Name Tool) to register the assembly for verification skipping. For example, Sn.exe –Vr delaySignedAssembly . Use this only for development.You can also specify this option as a custom attribute (AssemblyDelaySignAttribute) in the source code for any CIL module. |
/descr[iption]: 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 you do not specify /win32res, /description appears in File Explorer as the Win32 Comments resource. If text is an empty string, the Win32 Comments resource appears as a single space. If you specify /win32res, /description will not affect the Win32 resource information. You can also specify this option as a custom attribute (Description) in the source code for any CIL module. |
/e[vidence]: file |
Embeds file in the assembly with the resource name of Security.Evidence.You cannot use Security.Evidence for regular resources. |
/fileversion: version |
Specifies a string for the File Version field in the assembly. This string is a custom attribute on the assembly and is available for viewing with reflection. If you do not specify /win32res, /fileversion will be used as the Win32 File Version resource. If you do not specify /fileversion, the Win32 File Version resource will be populated by the Win32 Assembly Version resource. If /win32res is specified, /fileversion does not affect the Win32 resource. You can also specify this option as a custom attribute (AssemblyFileVersionAttribute) in the source code for any CIL module. |
/flags: flags |
Specifies a value for the Flags field in the assembly. Possible values for flags :0x0000 The assembly is side-by-side compatible. 0x0010 The assembly cannot execute with other versions if they are executing in the same application domain. 0x0020 The assembly cannot execute with other versions if they are executing in the same process. 0x0030 The assembly cannot execute with other versions if they are executing on the same computer. You can also specify this option as a custom attribute (AssemblyFlagsAttribute) in the source code for any CIL module. |
/fullpaths | Causes Al.exe to use the absolute path for any files that are reported in an error message. |
/help | Displays command syntax and options for the tool. |
/keyf[ile]: filename |
Specifies a file (filename ) that contains a key pair or just a public key to sign an assembly. The compiler inserts the public key in the assembly manifest and then signs the final assembly with the private key. See the Strong Name Tool (Sn.exe) for information about generating key files and installing key pairs into key containers.If you are using delayed signing, this file will usually have the public key but not the private key. The public key (of the key pair) information appears in the .publickey field of the assembly. You can also specify this option as a custom attribute (AssemblyKeyFileAttribute) in the source code for any CIL module. If both /keyfile and /keyname are specified (either by command-line option or by custom attribute) in the same compilation, Al.exe will first try the container specified with /keyname. If that succeeds, the assembly is signed with the information in the key container. If Al.exe does not find the key container, it will try the file specified with /keyfile. If that succeeds, the assembly is signed with the information in the key file and the key information will be installed in the key container (similar to the -i option in Sn.exe) so that on the next compilation, the /keyname option will be valid. |
/keyn[ame]: text |
Specifies a container that holds a key pair. This will sign the assembly (give it a strong name) by inserting a public key into the assembly manifest. Al.exe will then sign the final assembly with the private key. Use Sn.exe to generate a key pair. The key information appears in the .publickey field of the assembly. Place text in double quotation marks (" ") if there is an embedded space.You can also specify this option as a custom attribute (AssemblyKeyNameAttribute) in the source code for any CIL module. |
/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, or logo, displayed at the command line when you invoke Al.exe. |
/out: filename |
Specifies the name of the file produced by Al.exe. This is a required option. |
/platform: text |
Limits which platform this code can run on; must be one of x86, Itanium, x64, anycpu (the default), or anycpu32bitpreferred. |
/prod[uct]: 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 you do not specify /win32res, /product appears in File Explorer as the Win32 Product Name resource. If text is an empty string, the Win32 Product Name resource appears as a single space. If you specify /win32res, /product will not affect the Win32 resource information. You can also specify this option as a custom attribute (AssemblyProductAttribute) in the source code for any CIL module. |
/productv[ersion]: 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 you do not specify /win32res, /productversion will be used as the Win32 Product Version resource. If you do not specify /productversion, the Win32 Product Version resource will be populated by the Win32 File Version resource. If you specify /win32res, /productversion will not affect the Win32 resource information. You can also specify this option as a custom attribute (AssemblyInformationalVersionAttribute) in the source code for any CIL module. |
/t[arget]: lib[rary] | exe | win[exe] |
Specifies the file format of the output file: lib[rary] (code library), exe (console application), or win[exe] (Windows-based application). The default is lib[rary] . |
/template: filename |
Specifies the assembly, filename , from which to inherit all assembly metadata, except the culture field.An assembly that you create with /template will be a satellite assembly. |
/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 you do not specify /win32res, /title appears in File Explorer as the Win32 Description resource, which is used by the shell as the friendly name of an application. It is also displayed on the Open With submenu of the shortcut menu for a file type for which there are multiple supporting applications. If text is an empty string, the Win32 Description resource appears as a single space. If you specify /win32res, /title will not affect the Win32 resource information. You can also specify this option as a custom attribute (AssemblyTitleAttribute) in the source code for any CIL module. |
/trade[mark]: 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 you do not specify /win32res, /trademark appears in File Explorer as the Win32 Trademark resource. If text is an empty string, the Win32 Trademark resource appears as a single space. If you specify /win32res, /trademark will not affect the Win32 resource information. You can also specify this option as a custom attribute (AssemblyTrademarkAttribute) in the source code for any CIL module. |
/v[ersion]: version |
Specifies version information for this assembly. The format of the version string is major .minor .build .revision . The default value is 0.If you do specify /version, you must specify major . If you specify major and minor , you can specify an asterisk (*)for build . This causes build to be equal to the number of days since January 1, 2000, local time, and revision to be equal to the number of seconds since midnight of the current day, local time, divided by 2.If you specify major , minor , and build , you can specify an asterisk for revision . This causes revision to be equal to the number of seconds since midnight of the current day, local time, divided by 2.To summarize, the valid version strings are as follows: X X.X X.X.* X.X.X X.X.X.* X.X.X.X where X is any unsigned short constant except 65535 (0-65534). If you do not specify /win32res, /version will be used as the Win32 Assembly Version resource. If you do not specify /win32res, /productversion, and /fileversion, /version will be used for the Assembly Version, File Version, and Product Version Win32 resources. If you specify /win32res, /version will not affect the Win32 resource information. You can also specify this option as a custom attribute (AssemblyVersionAttribute) in the source code for any CIL module. |
/win32icon: filename |
Inserts an .ico file in the assembly. The .ico file gives the output file the desired appearance in File Explorer. |
/win32res: filename |
Inserts a Win32 resource (.res file) in the output file. A Win32 resource file can be created by using 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 that contains Al.exe commands. Commands in the response file can appear one per line or on the same line, separated by one or more spaces. |
/? | Displays command syntax and options for the tool. |
Remarks
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 with the manifest in a separate file.
To install assemblies in the cache, remove assemblies from the cache, or list the contents of the cache, use the Global Assembly Cache Tool (Gacutil.exe).
Errors and Warnings
The following table lists the errors generated by Al.exe.
Error | Description |
---|---|
al1001 | Internal compiler error Try to determine whether Al.exe is failing because of its inability to parse unexpected syntax. Then, contact Microsoft Product Support Services. |
al1002 | Out of memory Al.exe ran out of memory and stopped. Increase the amount of available memory. |
al1003 | Compiler option 'option' must be followed by an argument Al.exe expected an argument to be passed to a command-line option. For example, if you specify /algid:, you must pass an algorithm identifier. |
al1004 | Unexpected common language runtime initialization error — 'reason' Al.exe reported an error with the installation of Visual Studio or the common language runtime for the specified reason. |
al1005 | File 'file' too big to open All files opened by Al.exe must be smaller than 4 gigabytes (GB). |
al1006 | Response file 'file' was already included The same response file was specified ( @file ) more than once on the command line. The response file can only be included once. |
al1007 | Error opening response file 'file' — 'reason' Al.exe cannot open the specified response file for the specified reason. |
al1008 | Missing file specification for 'option' command-line option Al.exe expected a file to be passed to a command-line option. For example, if you specify the /out option, you must specify a file. |
al1009 | Can't open 'file' for writing Al.exe was unable to write to a file, such as the output assembly file. The disk might be full, the file might be read-only, or you might not have permissions to the file. |
al1010 | Command-line syntax error: Missing ':text' for 'option' option Al.exe expected an argument to be passed to a command-line option. For example, if you specify the /title option, you must pass a string. |
al1011 | File 'file' is an executable file and cannot be opened as a text file A binary file was specified where a text file was expected. For example, this error occurs if a binary file is passed on the command line as a response file. |
al1012 | 'value' is not a valid setting for option 'option' An unexpected value was passed to a command-line option. For example, this error occurs if you specify an invalid value to the /target option. |
al1013 | Unrecognized command-line option: 'option' An invalid command-line option was specified. |
al1014 | Unexpected initialization error — 'reason' Al.exe detected a COM initialization failure. This might be caused by a lack of memory, but a more likely cause is the system DLL files. You should see a similar error if you run any Automation-aware or COM-aware program, such as Microsoft Visual Studio. Reinstall the operating system. |
al1015 | Unable to find messages file 'alinkui.dll' Al.exe requires Alinkui.dll. Make sure that this file is on your path. If necessary, copy it from the product CD. |
al1016 | No valid input files were specified Al.exe requires one or more input files that do not have assembly information. |
al1017 | No target file name was specified The required /out option specifying the target file name was missing. |
al1018 | Required file 'file' could not be loaded Certain DLL files cannot be loaded. Reinstall Visual Studio or the Windows SDK. |
al1019 | Metadata failure while creating assembly—reason Generation of the assembly was interrupted for the specified reason. For example, this error occurs if a file that you specify with the /win32res option is not found. |
al1020 | Ignoring included assembly 'file' An input file that contained an assembly was specified. Al.exe input files cannot contain assemblies. |
al1021 | 'setting' : overriding previous setting A module had a value for a particular setting, possibly assigned through custom attributes, which was overridden with a value passed using an Al.exe command-line option. |
al1022 | Error reading embedded resource 'file'—reason Al.exe cannot read the file passed to the /embedresource option for the specified reason. |
al1023 | Error embedding resource 'file'—reason The operating system cannot embed the resource file in the assembly for the specified reason. |
al1025 | ComType record 'record' points to an invalid file record 'record' Metadata in the input module is invalid. The tool that produced the module must be fixed. |
al1026 | The version specified 'version' is invalid See information about the /version option for valid formats. |
al1028 | Key file 'file' is missing the private key needed for signing A key file that contains only the public key was passed to the /keyfile option. Use the Strong Name Tool (Sn.exe) to generate a file that has both a public and private key, as shown in the following command. sn -k keypair.snk. |
al1029 | The key container name 'container' does not exist The value passed to the /keyname option is not a valid container. Use the Strong Name Tool (Sn.exe) to create a container. |
al1030 | The cryptographic service is not installed properly or does not have a suitable key provider You might have to reinstall the operating system or install some cryptographic utility that was used to create the key. |
al1031 | Error reading icon 'file'—reason Al.exe cannot read the file that was passed to the /win32icon option for the specified reason |
al1032 | Error generating resources for 'file'—reason Al.exe cannot create a file because of insufficient disk space or some other error. This error occurs when you specify the /win32icon option (which generates an .ico file) or do not specify the /win32res option (which generates a file that has resource information). If you cannot resolve the file generation problem, use /win32res, which specifies a file that can contain version or bitmap (icon) information. |
al1033 | Assembly custom attribute 'attribute' was specified multiple times with different values Different values were passed to two occurrences of the same custom attribute in source modules that are specified as input to Al.exe. |
al1034 | Assembly 'file' cannot be copied or renamed While using the Al.exe syntax that enables you to both specify an input file and copy it, a name conflict arose that stopped the compiler. For example, this error occurs if you specify input.dll,somename.dll /out:somename.dll . |
al1035 | Libraries cannot have an entry point You cannot specify both the /target:lib option (the default) and the /main option. |
al1036 | Entry point required for executable applications When using the /target:exe or /target:win option, you must also specify the /main option. |
al1037 | Unable to find the entry point method 'main' Al.exe cannot find a Main method at the location specified by the /main option. |
al1039 | Initialization of global assembly cache manager failed—reason Reinstall Visual Studio or the Windows SDK. |
al1040 | Failed to install assembly into cache—reason Only signed assemblies can be installed into the cache. For more information, see Global Assembly Cache. |
al1041 | 'method': cannot be the entry point because the signature or visibility is incorrect, or it is generic A method was specified with the /main option, but that method is not static, does not return int or void , was generic, or has invalid arguments. |
al1042 | 'exe': EXEs cannot be added modules An .exe file that does not have an assembly was specified as an input file to Al.exe. Al.exe can only take dll files without assemblies as input files. |
al1043 | Manifest file name 'name' cannot be the same as any modules The name specified with the /out option cannot be the same as any one of the file names that are specified as input to Al.exe. |
al1044 | Error reading key file 'file'—reason An error occurred while opening or reading from a file specified with /keyfile or the AssemblyKeyFileAttribute. |
al1045 | Filename 'file' is too long or invalid A file name longer than 260 characters was passed to Al.exe. Choose a file name with fewer characters or a shorter path, or rename the file. |
al1046 | Resource identifier 'ID' has already been used in this assembly Two resources, embedded or linked, have the same identifier or name (the second argument). Remove or rename one of the conflicting resources. |
al1047 | Error importing file 'file'—reason A module file cannot be opened for the specified reason. |
al1048 | Error importing module 'module' of assembly 'assembly'—reason An error occurred when opening a nonmanifest file of a multifile assembly. This error is not emitted directly by Al.exe, but can be passed programmatically to a process that uses Al.exe. |
al1049 | Cannot auto-generate build and revision version numbers for dates before January 1, 2000 The system clock on your computer is set to a date earlier than January 1, 2000. |
al1050 | The feature you are using 'old feature' is no longer supported; please use 'new feature' instead A feature previously supported by Al.exe is now obsolete. Use the recommended feature instead. |
al1051 | Error emitting 'attribute' attribute—reason An assembly custom attribute was not processed by Al.exe for the specified reason. |
al1052 | File 'filename' is not an assembly The file specified with /template must contain assembly metadata. This error indicates that the file specified by /template did not contain an assembly. |
al1053 | The version 'version' specified for the 'option' is not in the normal 'major.minor.build.revision' format Al.exe detected ill-formed version information specified with the /fileversion or /productversion options. |
al1054 | The version 'version' specified for the 'option' is not in the normal 'major.minor.build.revision' format Al.exe detected ill-formed version information specified with the SatelliteContractVersionAttribute. |
al1055 | Referenced assembly 'filename' does not have a strong name This error is issued when you are building an assembly with a strong name and reference an assembly that does not have a strong name. To fix this, you must either regenerate your assembly with a strong name, or attach a strong name to the assembly by using Sn.exe (see the documentation for Sn.exe). A common occurrence of this error is when you are using COM objects by way of wrapper assemblies, such as when you add a reference to a COM module to a C# project by way of the Visual Studio IDE. To avoid the error, you can specify the strong name key file for COM wrapper assemblies in the Project Property "Wrapper Assembly Key File/Name" If you are creating the wrapper assembly through tlbimp, see the tlbimp documentation for information about how to assign a strong name to the wrapper assembly. If an assembly has a strong name, it can be installed in the global assembly cache. Consequently, referenced assemblies would also go into the global assembly cache. Only assemblies with strong names can go into the global assembly cache. |
al1056 | Referenced assembly 'filename' is a localized satellite assembly An assembly created by using the AssemblyCultureAttribute attribute was referenced in creating the current assembly. The AssemblyCultureAttribute attribute indicates the file is a localized satellite assembly and it is not appropriate to reference a satellite assembly. Reference the main parent assembly instead. |
al1057 | Executables cannot be localized, Culture should always be empty An assembly is being created by using /target:exe but /culture was specified. Assemblies in the .exe cannot have information in the Culture field. |
al1058 | 'file' is an assembly and cannot be added as a module In a C++ compilation, /assemblymodule (linker option) was passed a file that contained an assembly. |
al1059 | Unknown error (code) Al.exe received an unknown error code ( code ).Possible solutions include the following: Reinstall Visual Studio. Reinstall the Windows SDK. Check for missing files. Check for adequate disk space. Check for adequate memory. Stop other processes that might be accessing the files. Reboot your computer. |
al1060 | Cryptographic failure while creating hashes—reason An error occurred while creating the file hashes for a multifile assembly. |
al1061 | Cannot set option 'option' because 'reason' The value specified for this option is invalid for the specified reason. |
al1062 | Module 'module' was specified multiple times; it will only be included once This warning is generated when the same source, input, or module file is specified multiple times on the command line. Make sure that you specify the file name only once. |
al1063 | Public type 'type' is defined in multiple locations in this assembly: 'file1' and 'file2' The same type was found in more than one module in the assembly. Only one version of each type may be present in an assembly. |
al1064 | Cannot specify multiple /bugreport options. Only one /bugreport option is allowed. |
al1065 | File name 'File Name' is too long or invalid The specified file name is longer than the maximum allowed. |
al1066 | Character 'character' is not allowed on the command line or in response files An invalid character was found, either on the command line or in a file. |
al1067 | 'filename' is a binary file instead of a text file The file is in binary format instead of text. |
al1068 | Module 'ModuleName' is already defined in this assembly. Each linked resource and module must have a unique file name. The module occurs more than once in this assembly. |
al1069 | Cannot create short file name 'filename' when a long file name with the same short file name already exists The current file has a name that is the short version of a file name that already exists. For example, compiling LongFileName.cs and then recompiling with the name LongFi~1.cs will cause a compiler error similar to this. If the compiler output files that have long names were deleted, but the analogous linker files remained, this error might occur. |
al1070 | Agnostic assembly cannot have a processor-specific module 'Module Name' If you are building using /platform:agnostic (or you don't specify /platform), an error will be generated if you try to add a module (using /addmodule) that is not agnostic. This is like trying to link an i386 obj file to an ia64 obj. The main source of non-agnostic modules is C++. If you are using /addmodule with a C++ module, you may have to modify your build scripts to specify the appropriate /platform setting. |
al1072 | Assembly and module 'Module Name' cannot target different processors You cannot link an assembly and a module that are targeted for different processors, because the result has to run on a single processor. |
al1073 | Referenced assembly 'assembly' targets a different processor You cannot link assemblies that are targeted for different processors, because the result has to run on a single processor. |
al1074 | Module name 'Module Name' stored in 'File Name' must match its file name This is required of the linker. To resolve this problem, make the two names match. |
al1075 | Delay signing was requested, but no key was given When an assembly is delay signed, the compiler does not compute and store the signature, but reserves space in the file so the signature can be added later. For example, using /delaysign+ enables a tester to put the assembly in the global cache. After testing, you can fully sign the assembly by adding the private key to the assembly by using the Assembly Linker utility. |
al1076 | Type 'type' is forwarded to multiple assemblies: 'assembly' and 'assembly'. A type can only be forwarded to one assembly. |
al1077 | Public type 'type' is defined in 'assembly' and forwarded to 'assembly'. There is a duplicate public type in the assembly being generated. One is a valid type definition and the other is a type forwarder. |
Example
The following command creates an executable file t2a.exe with an assembly from the t2.netmodule
module. The entry point is the Main
method in MyClass
.
al t2.netmodule /target:exe /out:t2a.exe /main:MyClass.Main