我有一台VM机器,在机器上复制SDK文件和路径,转到注册表并将键添加到注册表中,但我一直收到无法找到resgen.exe的错误:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1835,9):
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 Installation Folder
value of the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\
Windows\v7.0A. 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.我查看了Microsoft\Microsoft SDKs\Windows\v7.0A文件夹,并在包括bin在内的几乎每个网络文件夹中复制了resgen.exe,但是它一直告诉我找不到resgen.exe。我不知道该怎么做。
发布于 2014-05-25 14:47:18
确保您的环境变量路径包括ResGen.exe所在的文件夹
发布于 2014-05-27 08:04:31
运行Regedit编辑注册表。查找键HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows。如果还没有一个名为"CurrentVersion“的设置,则创建一个类型为REG_SZ的新注册表设置"CurrentVersion”。确保它具有与HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\ ProductionVersion \v7.0A中的设置ProductionVersion相同的值。
请确保注册表中存在HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A\WinSDK-NetFX40Tools、HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A\WinSDK-NetFX40Tools-x86和HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A\WinSDK-NetFX40Tools-x64以及它们中设置的值InstallationFolder。
发布于 2017-05-09 14:18:34
我在项目中添加了以下SdkToolPath参数,这很有帮助。当然,它不是一个完整的解决方案,因为它不能在构建服务器上工作,但是现在它可以工作,我只是不从我的机器上签入它,这意味着我可以做我需要做的事情:
<GenerateResource SdkToolsPath="C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools" Sources="@(TextResource)" OutputResources="@(TextResource->'$(OutDir)CommandStrings.resources')" />https://stackoverflow.com/questions/23840912
复制相似问题