This is, in fact, a rare error that occurs when you are trying to build/rebuild a Visual Studio Windows application or class library project using VC++, although it is possible for the error to appear while working with VB.NET or C# if the project is referencing another VC++ project or Dynamic Link Library. The build fails because the VC++ compiler cannot find the process mt.exe and therefore cannot spawn(run) it. Mt.exe file is a command line tool that generates signed files and catalogs. It is available in the Microsoft Windows Software Development Kit (SDK). To fix the error, we need to inform Visual Studio about the location of the tool. Follow the steps below to resolve the problem:
- In Visual Studio, navigate to Tools -> Options from the top menu
- Select the Show All Settings option
- Expand the Projects and Solutions item in the tree
- Select VC++ Directories
- Repeatedly click on the New Item button (the yellow folder-like icon) to add each of the following 3 paths to the list:
- $(SystemRoot)
- $(SystemRoot)\System32
- $(SystemRoot)\System32\wbem
- Click OK and restart Visual Studio for the configuration to take effect. Below is a screenshot of the final configuration: