MSBuild 找不到 resgen.exe

2024-06-11

我有一台 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并复制过来resgen.exe几乎在每个网络文件夹中,包括 bin,但它一直告诉我resgen.exe找不到。我不知道该怎么办。


我将以下 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')" />
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

MSBuild 找不到 resgen.exe 的相关文章

随机推荐

  • 如何解决 Xcode 7 中的 No Type or Protocol Named 错误?

    我试图passing从第二个开始的值class我正在使用的头等舱protocol and delegate过程 每当我运行我的程序时 我都会遇到以下问题 No Type or Protocol Named locateMeDelegate
  • 理解“窗口”对象[重复]

    这个问题在这里已经有答案了 可能的重复 JS 窗口全局对象 https stackoverflow com questions 10035771 js window global object 如何window对象工作 我知道它是顶级对象并
  • Liftweb 环境中的后台任务

    我必须编写守护进程 并且我想使用模型来连接到数据库和一些有用的 Lift 类 是否可以运行 Rails 的 rake 任务的模拟 Scala 社区组上也有类似的问题 答案是使用Actors来做后台处理
  • 转储 Windows DLL 版本的命令行工具?

    我需要一个命令行工具来转储标准 Windows DLL 版本信息 以便我可以通过 bash 脚本 Cygwin 对其进行处理 作为一名 Java 开发人员 我不太习惯 Microsoft 开发工具 尽管我对 Microsoft Visual
  • 使用 pytz 获取时区的国家/地区代码?

    我在用着pytz http pytz sourceforge net country information 我已经阅读了整个文档表 但没有看到如何做到这一点 我有一个时区 美国 芝加哥 我想要的只是获取该时区的相应国家 地区代码 美国 它
  • rspec 在需要存根的私有方法中测试私有方法

    Simplecov 检测到我遗漏了一些测试lib api verson rb class class ApiVersion def initialize version version version end def matches req
  • 整个程序可以是不可变的吗? [关闭]

    Closed 这个问题需要多问focused help closed questions 目前不接受答案 我熟悉不可变性并且可以设计不可变类 但我主要拥有学术知识 缺乏实践经验 请参考上面的链接图片 尚不允许嵌入 从下往上看 学生需要新地址
  • Linux find 命令权限被拒绝

    我想过滤掉不必要的信息 权限被拒绝 这些是命令 的输出find type f name sources list find run lxcfs Permission denied find run sudo Permission denie
  • R 脚本 - 如何在错误时继续执行代码

    我编写了一个 R 脚本 其中包含一个检索外部 Web 数据的循环 数据的格式大多数时候是相同的 但有时格式会以不可预测的方式发生变化 并且我的循环崩溃 停止运行 有没有办法不管错误如何继续执行代码 我正在寻找类似于 VBA 中的 On er
  • Apache Zeppelin 安装 grunt 构建错误

    我的配置如下 Ubuntu 15 04 Java 1 7 Spark 1 4 1 Hadoop 2 7 Maven 3 3 3 我正在尝试从 github 成功克隆 Apache Zeppelin 并使用以下命令后安装它 mvn clean
  • ASP.NET 中的 ThreadStaticAttribute

    我有一个需要存储的组件static每个线程的值 它是一个通用组件 可以在许多场景中使用 而不仅仅是在 ASP NET 中 我想用 ThreadStatic 属性来实现我的目标 假设它在 ASP NET 场景中也能正常工作 因为我假设每个请求
  • 构建 AOSP 5.1 时出现 API 更改错误

    目前正在尝试构建 android 5 1 0 r5 我已经检查了来源并且没有做任何修改 但是 编译时出现以下错误 Checking API checkpublicapi current out target common obj PACKA
  • sed 将带空格的行插入到特定行

    我在开头有一行空格 例如 Hello world 我想将此行插入到文件中的特定行 例如 将 hello world 插入下一个文件 hello world result hello hello world world 我正在使用这个 sed
  • 在 C++ 中,将 float 转换为 double 再转换回 float 是否给出相同的值

    假设在下面的代码中 float f1 double d1 static cast
  • 如何在 Ubuntu x64 中使用 ptrace 插入 int3?

    我正在努力追随本指南 http eli thegreenplace net 2011 01 27 how debuggers work part 2 breakpoints 通过设置断点达到相同的结果 唯一的区别是我在 x64 系统上 所以
  • 致命:Jenkins IIS ID 无效

    我正在尝试设置 Jenkins 从 bitbucket 中提取并构建一个项目 我在 IIS 8 5 Server 2012 r2 上使用它 我已经设置了 Git 和 Bitbucket 插件 我已经建立了一个包含以下内容的项目 Branch
  • 404 路由无法匹配请求的 URL

    我刚刚开始学习zend 框架 questions tagged zend framework并遵循此用户指南 http framework zend com manual 2 3 en index html 我能够成功安装zend skel
  • create() 时不会调用观察者

    我有一个Ember Mixin它观察到它的属性之一 这里bar baz 我扩展了这个 Mixin 并设置了bar baz in the create 参数 但我的观察者没有被调用 这是我的代码 App FooMixin Ember Mixi
  • Google Maps JavaScript API v3 方向功能

    我使用 Google Maps js API v3 我可以根据路径点显示方向this http code google com intl hu apis maps documentation directions Waypoints 我想要
  • MSBuild 找不到 resgen.exe

    我有一台 VM 机器 我在其中复制了 SDK 文件和路径 转到注册表并将密钥添加到注册表中 但我不断收到错误 resgen exe找不到 C Windows Microsoft NET Framework v4 0 30319 Micros