# uip rpa build

> `uip rpa build` compiles a UiPath Studio project. It runs the workflow analyzer (unless skipped) and the workflow compiler against the project, but does **not** produce a `.nupkg`. Use it when you want to validate that a project compiles cleanly without packaging it — typical inner-loop or CI gate. Reach for [`uip rpa pack`](./uip-rpa-pack.md) when you also need a NuGet package for upload.

`uip rpa build` compiles a UiPath Studio project. It runs the workflow analyzer (unless skipped) and the workflow compiler against the project, but does **not** produce a `.nupkg`. Use it when you want to validate that a project compiles cleanly without packaging it — typical inner-loop or CI gate. Reach for [`uip rpa pack`](./uip-rpa-pack.md) when you also need a NuGet package for upload.

:::warning
**Runtime requirements**

- **.NET runtime** must be available on the runner — the workflow compiler is .NET-backed. See [Breaking changes — .NET runtime](./migration-breaking-changes.md#runtime-change-nodejs-18-replaces-net-as-the-cli-runtime-rpa-tool-keeps-a-net-dependency).
- **Windows runner for Windows projects.** Cross-platform projects (`targetFramework: "Portable"`) build on any OS. **Windows projects** (`targetFramework: "Windows"`) require a Windows runner. **Windows - Legacy projects** require [`uip rpa-legacy`](./uip-rpa-legacy.md). See [uip rpa overview](./uip-rpa.md) for the project-flavor matrix.
:::

## Synopsis

```
uip rpa build <projectDir> [options]
```

- `<projectDir>` — path to the Studio project (a directory containing `project.json`).

## Options

| Flag | Description |
|---|---|
| `--skip-analyze` | Skip the workflow-analyzer step. Useful when analysis runs as a separate pipeline stage via [`uip rpa analyze`](./uip-rpa-analyze.md). |
| `--governance-file-path <path>` | Path to a governance/policy rules file consumed by the analyzer. |
| `--governance-file-type <type>` | Type of governance file (the underlying packager validates the choice — run `uip rpa build --help` on a live install for the accepted set). |
| `--detailed-log-path <path>` | Write a detailed compiler/analyzer log to the given path. |
| `--exclude-configured-sources` | Ignore user/machine NuGet sources during dependency resolution. Use to enforce a hermetic build against `--nuget-sources-config-path` only. |
| `--nuget-sources-config-path <path>` | Path to a NuGet sources configuration file. |
| `--log-level <level>` | Compiler log level. Defaults to `Warn`. |

For the complete option list on your installed tool version, run:

```bash
uip rpa build --help
```

## Examples

```bash
# Build a project — fail the step on any compile or analyzer error
uip rpa build ./MyProject

# Build without re-running the analyzer (analysis runs in a separate CI stage)
uip rpa build ./MyProject --skip-analyze

# Build with governance enforcement
uip rpa build ./MyProject \
  --governance-file-path ./policies/governance.json
```

## When to use build vs pack

| Use case | Command |
|---|---|
| Validate a project compiles in CI before merging | `uip rpa build` |
| Produce a `.nupkg` for upload to Orchestrator or a feed | [`uip rpa pack`](./uip-rpa-pack.md) |
| Validate dependencies resolve and types compile, no governance | `uip rpa build --skip-analyze` |
| Run governance gates only, no compile output | [`uip rpa analyze`](./uip-rpa-analyze.md) |

`pack` does a build internally, so a separate `build` step before `pack` is redundant unless the two stages live in different pipeline jobs.

## Related

- [uip rpa pack](./uip-rpa-pack.md) — build *and* package into a `.nupkg`.
- [uip rpa analyze](./uip-rpa-analyze.md) — run only the workflow analyzer.
- [uip rpa restore](./uip-rpa-restore.md) — restore dependencies; a clean build needs them on disk.

## See also

- [RPA tool overview](./uip-rpa.md)
- [Global options](./global-options.md)
- [Exit codes](./exit-codes.md)
