碰到一个 VS 的 bug
error PRJ0002 : Error result 31 returned from 'mt.exe'http://social.msdn.microsoft.com/forums/en-US/vcgeneral/thread/8ab65340-2002-49b5-86a2-185269560030/
I have the same problem for a while now. Some times it occurs, some times not. I now used the Process Monitor from SysInternals to find out what causes the problem, and I found it. I have Google Desktop search installed on my machine and it scans every file when it changes to build the index. When mt.exe tries to add the manifest to the target file, Google Desktop may have it already opened for exclusive access, so mt.exe gets a sharing violation error and exits with the error code 31. I used to have Copernic Desktop search previously and I had the same problem with other applications as well, that's why I switched to Google Desktop search. The problem is much more rare with Google Desktop search, because it is running with a lower priority class. I tried to exclude the folder where I have my project files for Google, but it did not help, as Google still opens the files there. The real solution would be if MS fixes mt.exe so that it waits and tries to open the file a few times when it gets a sharing violation. A better error code would also help to identify the real problem.
碰到此问题，目前的办法，re-build the project - -~