# LibTmux.Workspace.WorkspaceBuilder.BuildAsync

- **Module:** LibTmux.Workspace
- **Package:** LibTmux.Workspace
- **Language:** C#
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-dotnet/blob/cf34b255c896d19a97e7d7fabea58609c916012d/src/LibTmux.Workspace/WorkspaceBuilder.cs#L35
- **Page:** https://libtmux.org/en/csharp/latest/workspace/reference/libtmux-workspace-workspacebuilder-buildasync/

```
LibTmux.Workspace.WorkspaceBuilder.BuildAsync(workspace: WorkspaceFile, cancellationToken: CancellationToken) -> Task<WorkspaceResult>
```

Plans and applies a workspace with the default policies.

Uses the same plan and application engine as explicit PlanAsync and ApplyAsync.
Input is sent immediately, without claiming shell readiness or command completion.
Use an explicit plan to review actions or select readiness, conflict, host-script
and compensation policies.

## Parameters

- `workspace` (`WorkspaceFile`): The workspace to build.
- `cancellationToken` (`CancellationToken`): Cancels planning or application.

## Returns

The materialized result and complete action journal.

## Raises

- [`WorkspaceFormatException`](/en/csharp/latest/workspace/reference/libtmux-workspace-workspaceformatexception/): The workspace declaration is invalid.
- [`TmuxSessionExistsException`](/en/csharp/latest/reference/libtmux-tmuxsessionexistsexception/): The requested session already exists.
- [`WorkspaceOperationCanceledException`](/en/csharp/latest/workspace/reference/libtmux-workspace-workspaceoperationcanceledexception/): The caller canceled application; the exception carries state and action journals.
- [`WorkspaceBuildException`](/en/csharp/latest/workspace/reference/libtmux-workspace-workspacebuildexception/): Application failed; the exception carries the action journal.
