Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.1k views
in Technique[技术] by (71.8m points)

visual studio 2010 - Error MSB6006: "mt.exe" exited with code 31

I ran into this problem today while migrating a VS2008 solution to VS2010. The problem occurred in either of the following scenarios:

  1. Rebuild Solution
  2. Clean followed by Build Solution

If I did a second Build after either of these, the problem did not show up. Using Google, all I really came up with was year-old blogs from Microsoft saying they are unable to reproduce the problem, or that it is fixed in a future release.

The best thing I found was here: Mikazo Tech Blog: Solve MT.exe Errors in Visual Studio 2010

In the above article it said that the problem is related to Manifest generation, and that the solution is to turn off Manifests in settings under Linker-->Manifest. I don't need Manifests for this project, but I still wasn't satisfied.

I have solved this, and am simply going to answer my own question, because I haven't found this specific error (code 31) on StackOverflow.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

WARNING: This exact error can also happen as a result of having a Windows Explorer window open in the folder containing the *.exe which you are currently attempting to build.

For example: Explorer open in /.../MyProj/Debug/ while trying to build the Debug version of your code in Visual Studio.

I was angry with myself for ~10min before realizing this.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...