ToolTask.ExecuteTool(String, String, String) Method

Definition

Writes out a temporary response file and shell-executes the tool requested. Enables concurrent logging of the output of the tool.

C#
protected virtual int ExecuteTool(string pathToTool, string responseFileCommands, string commandLineCommands);

Parameters

pathToTool
String

The computed path to tool executable on disk

responseFileCommands
String

Command line arguments that should go into a temporary response file

commandLineCommands
String

Command line arguments that should be passed to the tool executable directly

Returns

exit code from the tool - if errors were logged and the tool has an exit code of zero, then we sit it to -1

Applies to

Product Versions
MSBuild 15, 16, 17
MSBuild (.NET Core) 15, 16, 17