This documentation is archived and is not being maintained.

Unable to write the output of custom tool 'tool' to file 'file'. <reason> 

The project system could not write the output of the custom tool to the specified file.

Provided that the file name of a custom tool's input remains unchanged, the output from a custom tool is written to the same file. This error occurs if the generated output is locked on disk.

To correct this error

  • Restart Visual Studio and rerun the custom tool by right-clicking the affected file and selecting Run Custom Tool from the shortcut menu.

    The generated file is probably out-of-date, because the project system could not update it.