MSBuild编译错误“resgen.exe” .Net FX 3.5工具

6

我正在尝试在Windows 7 x64上使用VS2012编译项目。

我试图在安装了.Net Framework 4.0的Windows 7 x86虚拟机中使用MsBuild 4.0进行编译,但是出现了关于"resgen.exe"和netfx工具3.5的错误:

"C:\Users\Administrador\AppData\Local\Temp\Virtuosa Game Packer\Virtuosa Game P
acker.sln" (default target) (1) ->
"C:\Users\Administrador\AppData\Local\Temp\Virtuosa Game Packer\Extractor.vbpro
j" (default target) (2) ->
(CoreResGen target) ->
  C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(2291,5
): error MSB3091: Task failed because "resgen.exe" was not found, or the correc
t Microsoft Windows SDK is not installed. The task is looking for "resgen.exe"
in the "bin" subdirectory beneath the location specified in the InstallationFol
der value of the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft S
DKs\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) Inst
all 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 ta
sk. [C:\Users\Administrador\AppData\Local\Temp\Virtuosa Game Packer\Extractor.v
bproj]

    5 Warning(s)
    1 Error(s)

我的问题是,关于框架的要求需要另一台机器来编译项目?
如果我在虚拟机中安装NetFX Tools 3.5,那么我就可以编译项目了吗?
我在哪里可以下载NetFXTools 3.5 x86?(真的在谷歌上找不到)
2个回答

7

2

根据错误信息,您可以将resgen从计算机复制到vm上的某个位置,并更改注册表以指向正确的路径。


1
你在哪里找到它呢? - SoftwareSavant
2
您可以在主机计算机上的Windows SDK安装目录中找到ResGen.exe(例如C:\ Program Files(x86)\ Microsoft SDKs \ Windows \ v7.0A \ Bin)。您可以将其复制到虚拟机中。 - user1064248
我有同样的问题。我刚刚从下面的链接下载并安装了Microsoft Windows 7和.NET Framework 4的SDK,但最新的SDK的bin文件夹(C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin)绝对不包含resgen.exe。还有其他地方可以找到它吗? - Thomas Corriol
@wonko79 你所说的 VM 是什么意思? - Ghasem
VM == "虚拟机" - user1064248

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接