转:Solve Mt.exe Errors in Visual Studio 2010
本文转自MiKazo Tech Blog的博客:http://www.mikazo.com/2012/03/solve-mtexe-errors-in-visual-studio.html
I was working on a school project tonight, using Visual Studio 2010 on my 64-bit
Windows 7 machine, when I began to encounter several different errors each time
I built my project:
mt.exe : general error
c101008d: Failed to write the updated manifest to the resource of
file
C:\Program Files
(x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(574,5): error
MSB6006: "mt.exe" exited with code 31.
After searching the
internet, I found solutions related to manifest file settings in Visual Studio.
My problem was solved when I went to the project properties, under Linker then
Manifest File, change Generate Manifest to No.
For those of you that
don't care about why things are the way they are, you can stop reading
now.
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."
I'll
leave it up to you to decide whether your Visual Studio project needs this, but
for the sake of fixing Mt.exe errors, I don't really care at the moment, in my
case.