# LibTmux.Workspace.WorkspaceFile.Resolve

- **Module:** LibTmux.Workspace
- **Package:** LibTmux.Workspace
- **Language:** C#
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-dotnet/blob/cf34b255c896d19a97e7d7fabea58609c916012d/src/LibTmux.Workspace/WorkspaceFile.cs#L359
- **Page:** https://libtmux.org/en/csharp/latest/workspace/reference/libtmux-workspace-workspacefile-resolve/

```
LibTmux.Workspace.WorkspaceFile.Resolve(baseDirectory: string, variables: IReadOnlyDictionary<string, string>?) -> WorkspaceFile
```

Resolves inherited pane directories against an explicit document base.

Resolves relative paths against the parent declaration's directory. Expansion
accepts $NAME, ${NAME}, and a leading ~ using the supplied HOME variable;
$$ produces a literal dollar sign. Session, window and pane option values
expand supplied variables; unknown variables remain literal. Resolution reads
neither the process environment nor the filesystem. The builder treats resolved
directories as literal paths, including tmux format characters. Commands, the
host script, names and environment values remain literal. Failures retain the
original YAML or JSON value's line and column when the declaration was parsed.

## Parameters

- `baseDirectory` (`string`): The absolute directory containing the declaration.
- `variables` (`IReadOnlyDictionary<string, string>?`): The only variables available to directory and option-value expansion.

## Returns

A new declaration with absolute inherited directories and its document directory.

## Raises

- [`ArgumentException`](https://learn.microsoft.com/dotnet/api/system.argumentexception): The document base is not absolute.
- [`WorkspaceFormatException`](/en/csharp/latest/workspace/reference/libtmux-workspace-workspaceformatexception/): A directory or expansion is invalid.
