Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
This article describes the MSB6003 error code.
Message text
MSB6003: The specified task executable 'value' could not be run.
Description
This error indicates that an executable that's part of the build process can't execute. The output message usually describes another error that can provide more information on the cause of the problem.
Common causes of this error include:
- The executable file isn't found or the path to the file is incorrect.
- A necessary file for the build is in use or possibly locked by another program.
- Too many temporary files are present in the build folder.
- The path to reach the file is too long.
Resolution
Look to the extra error information provided to determine the cause of the problem.
If you need more information to diagnose the error, enable a diagnostic log by using the -verbosity:diag
command-line switch, and then check the MSBuild log file with the full diagnostics output. For longer output logs on large projects, consider using the binary log -bl
command-line switch with the MSBuild Structured Log Viewer to view the output more easily.
You can also set the MSBuildDebugEngine
environment variable to 1 to get all possible logs. For more information, see Building MSBuild for the .NET Framework - Logs.
If the task ran an executable, try running the executable separately with the same inputs and command line.
The following sections provide tips for resolving situations related to the error.
File or folder not found
If the executable isn't found, or the path is incorrect, verify the file name spelling. Check the installation location of the executable and confirm it's correctly installed.
File already in use
If other programs run on the same machine, they might lock a file needed for your build. Shut down any other processes that might be using the same files required for your project build.
Too many temporary files
If you're running MSBuild on a build server and temporary files are never removed, you might eventually reach the maximum number of files allowed in a folder. The limit is specific to the filesystem. For FAT32 filesystem, the limit is 65,534 files. For NTFS, the limit is 4,294,967,295 files. Upgrading from FAT32 to NTFS might help prevent this issue.
On a Windows system, the temporary files folder is stored in the TMP or TEMP environment variable. On a Mac or Linux system, the environment variable TMPDIR tells where temporary files are stored. Check the temp folder and empty it, as needed. Also, consider adding a scheduled job to clean the temp folder, or add steps to your build process to remove temp files that created during a build.
The maximum number of files can also be exceeded on another folder. Also, check for any tools in your build system that might be generating an overly large number of files.
File path too long
If the file path is too long for a build on Windows, consider updating a registry setting to enable long paths. For more information, see Maximum path length limitation. Adding a registry setting can be easier to implement and maintain than moving files to create shorter paths.
Applies to
All versions of MSBuild