杉宫竹苑工作室

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 2496|回复: 0

Microsoft Windows SDK for Windows 7 and .NET Framework 4

[复制链接]
发表于 2015-3-9 01:14:29 | 显示全部楼层 |阅读模式

正式会员享受无限制浏览网站功能和高速网盘下载,赶快加入本站吧!

您需要 登录 才可以下载或查看,没有账号?立即注册

x
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(2342, 9): error MSB3086: Task could not find "AL.exe" using the SdkToolsPath "" or the registry key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A". Make sure the SdkToolsPath is set and the tool exists in the correct processor specific location under the SdkToolsPath and that the Microsoft Windows SDK is installed
I've found similar reports from a year ago when people were upgrading to .NET 3.5, for example this one. In that case, installing the latest SDK solved the issue, however I have already installed the latest SDK (Microsoft Windows SDK for Windows 7 and .NET Framework 4) on my build server. The MSBuild tools are all there on the server, in a folder called
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319
and AL.exe exists in
C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\NETFX 4.0 Tools
However the registry key mentioned in the error message does not exist. So, it seems like there is something wrong with the installation/configuration of MSBuild. This error only happens for projects that have embedded resources, which require AL.exe.

Below is a table with all possible Assembly Linker errors:

ErrorDescription
al1001Internal compiler error

Try to determine whether Al.exe is failing because of its inability to parse unexpected syntax. Then, contact Microsoft Product Support Services.

al1002Out of memory

Al.exe ran out of memory and stopped. Increase the amount of available memory.

al1003Compiler 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.

al1004Unexpected 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.

al1005File ‘file’ too big to open

All files opened by Al.exe must be smaller than 4 gigabytes (GB).

al1006Response 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.

al1007Error opening response file ‘file’ — ‘reason’

Al.exe cannot open the specified response file for the specified reason.

al1008Missing 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.

al1009Can’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.

al1010Command-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.

al1011File ‘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.

al1013Unrecognized command-line option: ‘option’

An invalid command-line option was specified.

al1014Unexpected 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.

al1015Unable 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.

al1016No valid input files were specified

Al.exe requires one or more input files that do not have assembly information.

al1017No target file name was specified

The required /out option specifying the target file name was missing.

al1018Required file ‘file’ could not be loaded

Certain DLL files cannot be loaded. Reinstall Visual Studio or the Windows Software Development Kit (SDK).

al1019Metadata 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.

al1020Ignoring 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.

al1022Error reading embedded resource ‘file’ — reason

Al.exe cannot read the file passed to the /embedresource option for the specified reason.

al1023Error embedding resource ‘file’ — reason

The operating system cannot embed the resource file in the assembly for the specified reason.

al1025ComType 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.

al1026The version specified ‘version’ is invalid

See information about the /version option for valid formats.

al1028Key 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.
al1029The 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.

al1030The cryptographic service is not installed properly or does not have a suitable key provider

You might have to either reinstall the operating system or install some cryptographic utility that was that is used to create the key.

al1031Error reading icon ‘file’ — reason

Al.exe cannot read the file that was passed to the /win32icon option for the specified reason

al1032Error 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.

al1033Assembly 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.

al1034Assembly ‘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.

al1035Libraries cannot have an entry point

You cannot specify both the /target:lib option (the default) and the /main option.

al1036Entry point required for executable applications

When using the /target:exe or /target:win option, you must also specify the /main option.

al1037Unable to find the entry point method ‘main’

Al.exe cannot find a Main method at the location specified by the /main option.

al1039Initialization of global assembly cache manager failed — reason

Reinstall Visual Studio or the Windows SDK.

al1040Failed to install assembly into cache — reason

Only signed assemblies can be installed into the 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.

al1043Manifest 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.

al1044Error reading key file ‘file’ — reason

An error occurred while opening or reading from a file specified with /keyfile or the AssemblyKeyFileAttribute.

al1045Filename ‘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.

al1046Resource 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.

al1047Error importing file ‘file’ — reason

A module file cannot be opened for the specified reason.

al1048Error 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.

al1049Cannot 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.

al1050The 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.

al1051Error emitting ‘attribute’ attribute —’reason’

An assembly custom attribute was not processed by Al.exe for the specified reason.

al1052File ‘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.

al1053The 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.

al1054The 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.

al1055Referenced 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.

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.

al1056Referenced 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. You should probably reference the main parent assembly instead.

al1057Executables 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.

al1059Unknown 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.
al1060Cryptographic failure while creating hashes — reason

An error occurred while creating the file hashes for a multifile assembly.

al1061Cannot set option ‘option’ because ‘reason’

The value specified for this option is invalid for the specified reason.

al1062Module ‘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.

al1063Public 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.

al1064Cannot specify multiple /bugreport options.

Only one /bugreport option is allowed.

al1065File name ‘File Name’ is too long or invalid

The specified file name is longer than the maximum allowed.

al1066Character ‘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.

al1068Module ‘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.

al1069Cannot 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.

al1070Agnostic 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.

al1072Assembly 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.

al1073Referenced 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.

al1074Module 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.

al1075Delay 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.

al1076Type ‘type’ is forwarded to multiple assemblies: ‘assembly’ and ‘assembly’.

A type can only be forwarded to one assembly.

al1077Public 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.



回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|小黑屋|手机版|Archiver|SgzyStudio

GMT+8, 2024-5-4 03:21 , Processed in 0.110658 second(s), 18 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表