error MSB6006:"mt.exe" exited with code 31的解决办法

一、问题出现

  用VS编译项目的时候,总是遇到error MSB6006: "mt.exe" exited with code 31.这个问题。

具体错误如下:

二、解决办法

  设置project的属性Manifest Tool,把 “Input and Output”中的"Embed Manifest" 设置成No,具体操作如图:





三、问题原因

  原因和manifest有关,看到别人的博客中的解释:

According to Microsoft's documentation, Mt.exe is "a tool that generates signed files and catalogs". Mt.exe is used in the manifest generation process. If you don't know what a manifest is,further documentation explains: "A manifest is an XML document that can be an external XML file or a resource embedded inside an application or an assembly. The manifest of an isolated application is used to manage the names and versions of shared side-by-side assemblies to which the application should bind at run time. The manifest of a side-by-side assembly specifies its dependencies on names, versions, resources, and other assemblies."

  具体翻译就是:根据微软的文档,MT.EXE是“生成签名的文件和目录的工具”。 MT.EXE采用的是清单生成过程。如果你不知道什么是明显的是,更多的文档解释说:“manifest 是一个 XML 文档,可以是外部 XML 文件,也可以是嵌入应用程序或程序集内的资源。isolated application 的清单用于管理该应用程序在运行时应该绑定到的共享并行程序集的名称和版本。side-by-side assembly 的清单指定该程序集在名称、版本、资源和其他程序集上的依赖项。“



  • 1
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值