MSBuild无法找到resgen.exe [英] MSBuild cant find resgen.exe

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

问题描述

我有一台VM机器,在其中复制了SDK文件和路径,转到了注册表,并将密钥添加到了注册表中,但是我不断收到错误消息,找不到resgen.exe:

I have a VM machine where I copied over the SDK files and path, went to the registry and added the keys to the registry, but I keep getting the error that resgen.exe cannot be found:

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,并在几乎每个包含文件夹的网络文件夹中的resgen.exe上进行了复制,但是它一直告诉我找不到resgen.exe.我不知道该怎么办.

I looked in the folder Microsoft\Microsoft SDKs\Windows\v7.0A and copied over the resgen.exe in practically every single net folder including the bin, but it keeps telling me that resgen.exe cannot be found. I have no clue what to do.

推荐答案

我在项目中添加了以下SdkToolPath参数,这很有帮助.当然,这不是一个完整的解决方案,因为它不能在buildserver上运行,但是现在它可以正常工作,我只是不从机器中检入它,这意味着我可以做我需要做的事情:

I added the following SdkToolPath parameter to the project and that helped. Of course it is not a full solution as it will not work on the buildserver, but for now it works and I just don't check it in from my machine and it means I can do what I need to:

<GenerateResource SdkToolsPath="C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools" Sources="@(TextResource)" OutputResources="@(TextResource->'$(OutDir)CommandStrings.resources')" />

这篇关于MSBuild无法找到resgen.exe的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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