ToolchainEnvironment.RunAsync
Section titled “ToolchainEnvironment.RunAsync”
- Runs a child build with caller-owned output destinations and the shared process retirement protocol.
Required contracts
Section titled “Required contracts”API: engine
Project: Inno.Build.Toolchains
Declaration
Section titled “Declaration”public static System.Threading.Tasks.Task Inno.Build.Toolchains.ToolchainEnvironment.RunAsync(string fileName, System.Collections.Generic.IReadOnlyList<string> arguments, string workingDirectory, System.Threading.CancellationToken cancellationToken, System.Collections.Generic.IReadOnlyDictionary<string, string?>? environment, System.IO.TextWriter standardOutput, System.IO.TextWriter standardError)Parameters
Section titled “Parameters”Parameter fileName: The executable selected by the build composition.
Parameter arguments: Structured arguments passed without shell interpretation.
Parameter workingDirectory: The project directory controlling SDK and workload resolution.
Parameter cancellationToken: Cancels the complete process tree and drains both output streams.
Parameter environment: Optional child-only toolchain variables. Null values remove inherited variables; empty values remain explicitly empty.
Parameter standardOutput: The caller-owned standard output destination; the runner does not dispose it.
Parameter standardError: The caller-owned standard error destination; the runner does not dispose it.
Returns
Section titled “Returns”Completion after successful exit and complete output delivery; failures propagate.
Exceptions
Section titled “Exceptions”Exception T:System.InvalidOperationException: The executable cannot start or exits unsuccessfully.
Exception T:System.IO.IOException: An output destination fails; the owned process tree is terminated before failure returns.
Exception T:System.OperationCanceledException: The operation was canceled after retiring its owned process tree.