Execution
Run processes and installed tools, capture output, and control logging and failure behavior.
Entry points
Do.Exec(ToolCommand)
Starts the rendered command in the configured working directory, using the native batch host when required.
public static ExecProcess Exec(ToolCommand command)Parameters
commandToolCommand-
A typed command whose canonical rendering and execution options are used.
Returns
Do.Exec(string, ExecOptions?)
Starts the command in the configured working directory, using the native batch host when required.
public static ExecProcess Exec(string command, ExecOptions? options = null)Parameters
commandstring-
One executable and its arguments. The first token may be quoted; shell operators and expansion are not interpreted.
optionsExecOptions?-
Optional working-directory, child-environment, and per-line logging behavior.
Returns
Do.Exec<TResult>(PackageToolCommand<TResult>)
Runs a declared local package tool without automatically restoring it.
public static ExecProcess Exec<TResult>(PackageToolCommand<TResult> command)Parameters
commandPackageToolCommand<TResult>
Returns
Type Parameters
TResult
Do.WorkingDirectory
The process working directory used by relative execution and workspace discovery; setting it changes the process-wide current directory.
public static AbsolutePath WorkingDirectory { get; set; }