gpt4 book ai didi

c# - 任务失败,因为找不到 AL.exe,

转载 作者:可可西里 更新时间:2023-11-01 08:02:50 25 4
gpt4 key购买 nike

编译项目时出现以下错误:

Task failed because "AL.exe" was not found, or the correct Microsoft Windows SDK is not installed. The task is looking for "AL.exe" in the "bin" subdirectory beneath the location specified in the InstallationFolder value of the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v6.0A. You may be able to solve the problem by doing one of the following:

  1. Install the Microsoft Windows SDK for Windows Server 2008 and .NET Framework 3.5.
  2. Install Visual Studio 2008.
  3. Manually set the above registry key to the correct location.
  4. Pass the correct location into the "ToolPath" parameter of the task.

当我将资源文件添加到我的 UnitTest 项目中的文件夹时出现此错误。这些资源文件不直接被我的程序用于本地化,它们就像普通文件一样。我需要它们对我的程序中的一些逻辑进行单元测试,这些逻辑使用 ResXResourceReader 加载这些资源文件。

谁能解释一下为什么会出现这个错误?

编辑:安装 Windows SDK 解决了该问题,如错误中所述。但我还是想知道为什么会出现这个错误。我对我没有意义。

最佳答案

您收到此错误是因为您正在构建一个使用程序集 list 的 3.5 项目,但没有安装 3.5 工具。 (希望有人能提供更多信息。)

我强烈建议安装 Microsoft Windows SDK for Windows 7 and .NET Framework 3.5 SP1 避免黑客攻击,尤其是当您只需要安装工具时,请务必查看发行说明以了解 AL.exe 信息。 (由于安全更新修复,此 SDK 是 3.5 的推荐安装。)

SDK 的“发行说明”表明 ALTOOLPATH 是由 Visual Studio 2005 设置的,这可能解释了为什么有些用户在构建时遇到问题。这是我的猜测。

使用 SysInternals 的进程监视器,在构建 3.5 项目时,Visual Studio 2008 在 %SystemRoot%\Microsoft.NET\Framework\v3.5 文件夹中查找程序集链接器 (AL.exe)。如果在那里找不到 AL,它将使用特定 v6.0A 注册表设置中指定的位置。 (请注意,v6.0A 不适用于 .NET 3.5。)因此,安装正确的软件并且不要破解。 :O)

我的问题是 2.0、3.0 和 3.5 之间的程序集链接器不同吗?


Windows SDK for Windows Server 2008 and .NET Framework 3.5

Installing the newly released Microsoft Windows SDK for Windows 7 and .NET Framework 3.5 SP1 instead of this release is recommended. If you do go ahead and install this SDK after VS2008 SP1, please ensure the patch described in Knowledge Base 974479 is applied. See Overview section for more information.

关于c# - 任务失败,因为找不到 AL.exe,,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1109955/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com