Hi I am running following command from my post build event:
C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\mt.exe -manifest "$(ProjectDir)$(TargetName).exe.manifest" -updateresource:"$(TargetDir)$(TargetName).exe;#1"
It is failing with Exited with code 9009... I don't understand why this happens; any suggestions?
Download Outbyte PC Repair application See more information about Outbyte; uninstall instructions; EULA; Privacy Policy. Click the Scan Now button to detect issues and abnormalities. Click the Repair All button to fix the issues.
Error Code 9009 means error file not found. All the underlying reasons posted in the answers here are good inspiration to figure out why, but the error itself simply means a bad path.
The Mt.exe file is a tool that generates signed files and catalogs. It is available in the Microsoft Windows Software Development Kit (SDK). Mt.exe requires that the file referenced in the manifest be present in the same directory as the manifest.
Exit code 9009 is a file not found error. The spaces that exist in your path to the post build command cause errors in a command prompt unless you include quotes around the entire path and executable name. Essentially, in your post-build command, it is trying to execute C:\Program
with the arguments:
Files\Microsoft
SDKs\Windows\v7.0A\bin\mt.exe
-manifest "$(ProjectDir)$(TargetName).exe.manifest"
-updateresource:"$(TargetDir)$(TargetName).exe;#1"
Since obviously you don't have a file called Program
residing in your root directory, this entire command fails. Encapsulating the path and executable in quotes will cause the entire expression to be evaluated as a single command, so everything should work fine if you change the post-build command to:
"C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\mt.exe" -manifest "$(ProjectDir)$(TargetName).exe.manifest" -updateresource:"$(TargetDir)$(TargetName).exe;#1"
Or use for VisualStudio x86 in Windows x64
"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\mt.exe"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With