msbuild失败:MSB3086,MSB3091:"AL.exe","resgen.exe"未找到 [英] msbuild fails: MSB3086, MSB3091: "AL.exe", "resgen.exe" not found

查看:570
本文介绍了msbuild失败:MSB3086,MSB3091:"AL.exe","resgen.exe"未找到的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在64位Windows 7计算机上,我从Windows Server 2003安装了.Net Framework 4.5.1和Windows SDK for Windows 8.1. http://msdn.microsoft.com/en-us/windows/desktop/aa904949.aspx

On a 64 bits Windows 7 machine, I installed .Net framework 4.5.1 and Windows SDK for Windows 8.1 from http://msdn.microsoft.com/en-us/windows/desktop/aa904949.aspx

在尝试构建解决方案时,出现以下错误(似乎是相关的):

While attempting to build a solution, I get the following errors (that seem to be related):

错误MSB3086:使用SdkToolsPath"或注册表项"HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Microsoft SDKs \ Windows \ v8.0A \ WinSDK-NetFx40Tools-x86"无法找到任务"AL.exe".确保已设置SdkToolsPath,并且该工具位于SdkToolsPath下正确的处理器特定位置,并且已安装Microsoft Windows SDK

error MSB3086: Task could not find "AL.exe" using the SdkToolsPath "" or the registry key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v8.0A\WinSDK-NetFx40Tools-x86". 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

错误MSB3091:任务失败,因为找不到"resgen.exe",或者未安装正确的Microsoft Windows SDK.该任务正在注册表项HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Microsoft SDKs \ Windows \ v7.0A \ WinSDK-NetFx35Tools-x86的InstallationFolder值中指定的位置下的"bin"子目录中寻找"resgen.exe".您可以通过执行以下任一操作来解决此问题:1)安装Microsoft Windows SDK. 2)安装Visual Studio2010.3)手动将上面的注册表项设置为正确的位置. 4)将正确的位置传递到任务的"ToolPath"参数中.

error MSB3091: Task failed because "resgen.exe" was not found, or the correct Microsoft Windows SDK is not installed. The task is looking for "resgen.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\v7.0A\WinSDK-NetFx35Tools-x86. You may be able to solve the problem by doing one of the following: 1) Install the Microsoft Windows SDK. 2) Install Visual Studio 2010. 3) Manually set the above registry key to the correct location. 4)Pass the correct location into the "ToolPath" parameter of the task.

我尝试了建议的解决方案(除了安装VS:在那台机器上不允许),在Internet上找到了许多其他解决方案,例如重新安装SDK,在注册表中执行某些修改,设置环境变量,在项目中添加标签,尝试将许多命令行开关切换到msbuild进程,并遵循以下线程:

I tried the suggested solutions (except installing VS: not allowed on that machine), many others found on the Internet, such as reinstalling the SDK, perform some hacks in the registry, set environment variables, add tags in the project, attempt many command line switches to the msbuild process, and followed these threads:

正在运行的MSBuild无法读取SDKToolsPath

构建失败,因为找不到AL.exe

tfs 2012构建任务失败,因为"resgen"找不到

但他们都没有解决问题.

but none of them solved the problem.

此问题类似于:

https://stackoverflow.com/q/23655387/1288109

没有答案!

任何建议将不胜感激!

推荐答案

尽管SDK的设置说它是最新的,但可能不是最新的. 我终于解决了这个问题,方法是删除所有已安装的SDK版本,然后按以下顺序安装以下内容:

Although the setups for the SDK sayd that it was up to date, probably it was not. I finally solved the issue by removing all installed versions of SDK, then installing the following, in this order:

http://www.microsoft.com/zh-CN -us/download/details.aspx?id = 3138

http://www.microsoft.com/zh-CN -us/download/details.aspx?id = 8279

http://msdn.microsoft.com/en-us /windows/desktop/hh852363.aspx

http://msdn.microsoft.com/en-us /windows/desktop/aa904949.aspx

我只是指出可能还有其他相关问题:安装完所有上述内容后,我终于遇到另一种错误,对于某些项目(目标框架3.0),未指定输出路径.而是将其指定为bin \ release.我用bin \ $(Configuration)\替换了它,终于建立了我的解决方案.

I just point out that there could be some other related issue: after having installed all the above, I finally had another kind of error saying, for some projects (targeting framework 3.0), that the output path was not specified. It WAS instead specified as bin\release. I replaced it with bin\$(Configuration)\ and my solution finally built.

另请参阅:

https://stackoverflow.com/a/26123890/1288109

这篇关于msbuild失败:MSB3086,MSB3091:"AL.exe","resgen.exe"未找到的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆