ToolchainEnvironment.RunAsync
Section titled “ToolchainEnvironment.RunAsync”
- Runs a child build with structured arguments, cancellation and hidden windows.
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 = null)Parameters
Section titled “Parameters”Parameter fileName: The executable to launch.
Parameter arguments: The individual arguments, passed without shell interpretation.
Parameter workingDirectory: The repository or staging directory owned by the operation.
Parameter cancellationToken: Cancels the child process and its complete process tree.
Parameter environment: Optional process-local toolchain variables; the parent environment is unchanged. Null values remove inherited variables, while empty values remain explicitly empty.
Returns
Section titled “Returns”Completion after both output streams have drained and the process succeeds.
Exceptions
Section titled “Exceptions”Exception T:System.InvalidOperationException: The process fails to start or exits unsuccessfully.
Exception T:System.OperationCanceledException: The operation was canceled.
Exception T:System.IO.IOException: Redirected output cannot be read or forwarded; the process tree is terminated before failure returns.