Table of Contents

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

command ToolCommand

A typed command whose canonical rendering and execution options are used.

Returns

ExecProcess

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

command string

One executable and its arguments. The first token may be quoted; shell operators and expansion are not interpreted.

options ExecOptions?

Optional working-directory, child-environment, and per-line logging behavior.

Returns

ExecProcess

Do.Exec<TResult>(PackageToolCommand<TResult>)

Runs a declared local package tool without automatically restoring it.

public static ExecProcess Exec<TResult>(PackageToolCommand<TResult> command)

Parameters

command PackageToolCommand<TResult>

Returns

ExecProcess

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; }

Property Value

AbsolutePath

Related types