CommandLineToolTask.

InvokeCommandLineTool(ITaskItem, IEnumerable<string>, ITaskItem, DataReceivedEventHandler, DataReceivedEventHandler) Method

Summary

Invokes the command line tool at the given path with the given arguments.

Syntax

protected int InvokeCommandLineTool(ITaskItem exePath, IEnumerable<string> arguments, ITaskItem workingDirectory = null, DataReceivedEventHandler standardOutputHandler = null, DataReceivedEventHandler standardErrorHandler = null)

Parameters

Name Type Description
exePath ITaskItem The path to the command line executable.
arguments IEnumerable<string> The ordered list of command line arguments that should be passed to the application.
workingDirectory ITaskItem The full path to the working directory.
standardOutputHandler DataReceivedEventHandler The event handler that handles the standard output stream of the command line application. If no value is provided then all messages are logged.
standardErrorHandler DataReceivedEventHandler The event handler that handles the standard error stream of the command line application. If no value is provided then all messages are logged as errors.

Return Value

Type Description
int The exit code of the application.