Microsoft.CppCommon.targets(574,5): error MSB6006: "mt.exe" exited with code 31.解决办法
2014-12-08 19:53
525 查看
一、问题出现
用VS编译动态库dll文件的时候,ReBuild过程中会遇到Microsoft.CppCommon.targets(574,5): error MSB6006: "mt.exe" exited with code 31.这个问题,略坑爹啊,找了半天都是英文的解决办法,也没解释清楚,于是记录分享。具体错误如下
[plain] view plaincopyprint?
1> Generating code
1> Finished generating code
1> myRecast1.vcxproj -> C:\Users\Lufeng\Documents\Visual Studio 2010\Projects\myRecast1\x64\Release\recast.dll
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(574,5): error MSB6006: "mt.exe" exited with code 31.
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:01.57
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
<span style="font-size:18px;">1> Generating code 1> Finished generating code 1> myRecast1.vcxproj -> C:\Users\Lufeng\Documents\Visual Studio 2010\Projects\myRecast1\x64\Release\recast.dll 1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(574,5): error MSB6006: "mt.exe" exited with code 31. 1> 1>Build FAILED. 1> 1>Time Elapsed 00:00:01.57 ========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ========== </span>
二、解决办法
设置project的属性Manifest Tool,把 "Embed Manifest" 设置成No,具体操作如图:这样就能正常编译了,ReBuild再多次都不会报错了。。
三、问题原因
具体问题原因如下,和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 的清单指定该程序集在名称、版本、资源和其他程序集上的依赖项。“
全文完。。
/article/3617968.html
相关文章推荐
- Microsoft.CppCommon.targets(574,5): error MSB6006: "mt.exe" exited with code 31.解决办法
- error MSB6006:"mt.exe" exited with code 31的解决办法
- error MSB6006: "mt.exe" exited with code 31
- error MSB6006: "mt.exe" exited with code 31
- CustomBuild:拒绝访问。 error MSB6006: "cmd.exe" exited with code 1.
- CustomBuild:拒绝访问。 error MSB6006: "cmd.exe" exited with code 1.
- error MSB6006: "cmd.exe" exited with code 4.解决方法
- ”LC.exe” exited with code -1错误的解决办法
- sgen.exe" exited with code 1.解决方法
- virtualbox 安装 extension pack 方法以及出现 "The installer failed with exit code 1: VBoxExtPackHelperApp.exe: error: Failed to rename the temporary directory to the final one"的解决办法
- 安装SQL Server 2012 RTM遇到"Microsoft .NET Framework 4.0 installation has failed with exit code 1642"的解决
- 启动"Start SoftICE"提示的错误Errror code 31的解决办法
- Qt4 msbuild microsoft cpp v4 0 microsoft cppcommon targets 151 5 error msb6006 cmd exe已退出代码为1
- error MSB6006: "cmd.exe" exited with code 3. / Cannot open include file: 'QtCore/qglobal.h': No such
- error "cmd.exe" exited with code 1
- XXXX.exe exited with code -1073741515解决办法
- ”LC.exe” exited with code -1错误的解决办法
- OpenCv编译错误-"cmd.exe" exited with code 1
- xxx\Microsoft.Common.targets: error MSB3073: The command xxx exited with code 4
- 调试错误 error MSB3073: :VCEnd" exited with code 解决办法