# uip solution pack

> Syntax and options for `uip solution pack`, which produces a deployable `.zip` from a solution directory or `.uis` bundle file.

`uip solution pack` produces a deployable `.zip` package from a solution directory (containing a `.uipx` manifest) or from a `.uis` bundle file. The resulting archive is what [`uip solution publish`](./uip-solution-publish.md#synopsis) uploads to the tenant feed, which [`uip solution deploy run`](./uip-solution-deploy.md#uip-solution-deploy-run) can then deploy.

Pack is an offline operation — it does not contact Orchestrator except to resolve NuGet dependencies from tenant feeds (and, with `--feed-folder`, from an Orchestrator folder's package feed), and does not contact AutomationOps except when a governance flag or `--ignored-rules` is passed while you are signed in — so it is safe to run inside build steps that do not yet have full credentials, as long as dependency resolution is covered.

## Synopsis

```
uip solution pack <solutionPath> [outputPath] \
  [--name <name>] [--version <version>] \
  [--project <id-or-path> [--package-id <id>]] \
  [--dry-run] [--skip-build] \
  [--skip-analyze] [--ignored-rules <rules>] [--governance-file-path <path>] [--governance-product <product>] \
  [--nuget-sources-config-path <path>] [--exclude-configured-sources] [--feed-folder <name>] \
  [--signing-certificate-path <path>] [--signing-certificate-password <password>] [--signing-timestamp-server <url>] \
  [--author <text>] [--description <text>] [--release-notes <text>] [--project-url <url>] \
  [--repository-url <url>] [--repository-commit <sha>] [--repository-branch <branch>] [--repository-type <type>] \
  [--login-validity <minutes>]
```

The command honours the [global options](./global-options.md) and returns the [standard exit codes](./exit-codes.md).

## Arguments

- `<solutionPath>` *(required)* — Path to a solution directory (containing a `.uipx` manifest) or a `.uis` file.
- `[outputPath]` *(optional)* — Output directory where the `.zip` package will be written. **Required unless `--dry-run` is set** — omitting it without `--dry-run` fails with a pointer to add one or the other.

## Options

### Core

| Long | Value | Default | Description |
|---|---|---|---|
| `-n, --name <name>` | text | solution folder name (or `.uis` file's base name) | Package name. The packaged `.zip` is named `<name>_<version>.zip`. |
| `-v, --version <version>` | text | `1.0.0` | Package version. Appears in the output filename and is the value passed to `--package-version` on `deploy run`. |
| `--project <id-or-path>` | project `Id` or path | — | Pack only this project of the solution into its own `.nupkg`, instead of the solution `.zip`. Takes the project's `Id` from the `.uipx`, or its path relative to the solution folder; separators and case are ignored. The project packs as a stand-alone project, so no solution resources go into it. Not supported for a `.uis` file, and cannot be combined with `--name`. Refer to [Pack one project](#pack-one-project). |
| `--package-id <id>` | text | the id a whole-solution pack gives the project | Package id for the project packed with `--project`. Without it, the project keeps the id a whole-solution pack gives it: the one the solution saved, else `<solution>.<type>.<project folder>`. Requires `--project`. |
| `--dry-run` | flag | off | Run the full pack pipeline (resource sync, runtime-dependency emission, packager option validation) against a disposable temporary copy and discard the output. Catches pack-time failures — a missing dependency, a broken resource binding, an unpackable project type — without producing a `.zip` or writing anything back into the solution. It does **not** inspect the produced package's contents, so it cannot guarantee the solution feed will accept the result. Makes `[outputPath]` optional. |
| `--skip-build` | flag | off | Pack each coded app's existing build output instead of running its dependency install and `build` script first. Use it when the pipeline already built the app, or when the pack step cannot reach the package registry. A coded app with no build output then fails the pack. Refer to [Coded app builds](#coded-app-builds). |
| `--login-validity <minutes>` | minutes | `10` | Minimum minutes before token expiration to trigger a refresh. Only relevant when dependency resolution needs a tenant feed, or when the tenant's governance policy is checked. |

### Dependency resolution

| Long | Value | Default | Description |
|---|---|---|---|
| `--nuget-sources-config-path <path>` | path | — | Path to a NuGet sources configuration file for resolving project dependencies. |
| `--exclude-configured-sources` | flag | off | Resolve dependencies only from tenant feeds and `--nuget-sources-config-path`. Drops the built-in UiPath and nuget.org feeds — a dependency not on those feeds fails to restore. |
| `--feed-folder <name>` | name or path | — | Resolve dependencies from this Orchestrator folder's package feed in addition to the tenant library feeds. For a folder that uses the tenant package feed, that is the tenant Processes feed. Accepts a folder name or fully qualified path. A folder that cannot be found fails the command. |

### Governance analysis

`--skip-analyze`, `--ignored-rules`, `--governance-file-path`, and `--governance-product` control the workflow analyzer that runs against every RPA project in the solution. The flags can be combined.

| Long | Value | Default | Description |
|---|---|---|---|
| `--skip-analyze` | flag | off | Skip the workflow analyzer for every RPA project. Compilation and validation still run — only the analyzer rules are skipped. |
| `--ignored-rules <rules>` | comma-separated rule IDs | — | Analyzer rule IDs whose findings are ignored for every RPA project, for example `ST-USG-034,ST-MRD-002`. Repeat the flag to add more. The rules still run, but their findings are not reported and do not fail the pack. Applies on top of `--governance-file-path` or the shipped rules. When the signed-in tenant publishes an AutomationOps policy, the list is not applied and a warning says so. |
| `--governance-file-path <path>` | path | — | Analyze every RPA project against this local governance policy file instead of the analyzer rules shipped with the WorkflowCompiler. Accepts a policy exported from AutomationOps or a Studio rules-configuration file. When you are signed in, the tenant is asked first (about `StudioWeb`, unless `--governance-product` names another product). When the tenant publishes a policy of its own, that policy is used, this file is ignored with a warning, and the pack continues. When the tenant publishes no policy, when it cannot be asked, or when its policy service does not answer, this file is used. The file is read before the tenant is asked, so an unreadable or non-JSON file fails the pack in every case. |
| `--governance-product <product>` | text | — | Analyze every RPA project against the governance policy published in AutomationOps for the signed-in tenant. The value is the **product** whose policy is downloaded — for example `StudioWeb`, `Development`, `Business`. |

An empty value for either governance flag (`--governance-file-path ""`) is rejected as a mistake, not silently treated as "no flag."

### Package signing

Signing an already-packed project's `.nupkg` requires the `dotnet` CLI on `PATH`.

| Long | Value | Default | Description |
|---|---|---|---|
| `--signing-certificate-path <path>` | path | — | Path to a `.pfx` code-signing certificate. When set, every packed project `.nupkg` in the solution is signed before being bundled into the solution `.zip`. |
| `--signing-certificate-password <password>` | text or `env.VAR` | — | Certificate password. Pass `env.ENV_NAME` to read from an environment variable instead of the shell history. |
| `--signing-timestamp-server <url>` | URL | — | Timestamp server URL for the signature. |

### Package metadata (source traceability)

These flags stamp traceability metadata into a `package.metadata.json` file at the archive root and into each project's `.nuspec`. None are required. When `--author` or `--description` is omitted, each member project keeps the value its own project file declares, and falls back to `UiPath` / `Created by UiPath` when it declares none.

| Long | Value | Default | Description |
|---|---|---|---|
| `--author <text>` | text | each project's own author, else `UiPath` | Package author. When set, applies to every member project. |
| `--description <text>` | text | each project's own description, else `Created by UiPath` | Package description. When set, applies to every member project. |
| `--release-notes <text>` | text | — | Release notes for the package. |
| `--project-url <url>` | URL | — | Automation Hub idea URL. |
| `--repository-url <url>` | URL | — | Source repository URL. |
| `--repository-commit <sha>` | text | — | Source repository commit hash. |
| `--repository-branch <branch>` | text | — | Source repository branch. |
| `--repository-type <type>` | text | `git` (when `--repository-url` is set) | Source repository type. Only recorded when `--repository-url` is also set. |

## Examples

### Minimal

```bash
uip solution pack ./my-solution ./dist
```

Packs the solution at `./my-solution` into `./dist/my-solution_1.0.0.zip` (default version).

### Common — pin name and version for a CI build

```bash
uip solution pack ./my-solution ./dist --name invoices --version 1.2.0
```

Writes `./dist/invoices_1.2.0.zip`.

### Validate without packing

```bash
uip solution pack ./my-solution --dry-run
```

Runs the full pack pipeline against a temporary directory and discards the output — useful as a pre-deploy gate in CI, since it catches resource-binding, variable-reference, and runtime-dependency errors without needing an `outputPath`.

### Stamp source-traceability metadata

```bash
uip solution pack ./my-solution ./dist --version 1.2.0 \
  --repository-url https://github.com/acme/repo \
  --repository-commit abc123 \
  --repository-branch main \
  --release-notes "v1.2.0"
```

### Sign packed projects

```bash
uip solution pack ./my-solution ./dist --version 1.2.0 \
  --signing-certificate-path ./cert.pfx \
  --signing-certificate-password env.UIPATH_SIGNING_CERTIFICATE_PASSWORD \
  --signing-timestamp-server http://timestamp.digicert.com
```

### Skip the workflow analyzer

```bash
uip solution pack ./my-solution ./dist --version 1.2.0 --skip-analyze
```

Compilation and validation still run — only the analyzer rules are skipped.

### Analyze against a tenant governance policy

```bash
uip solution pack ./my-solution ./dist --version 1.2.0 --governance-product Development
```

### Pack coded apps that the pipeline already built

```bash
uip solution pack ./my-solution ./dist --version 1.2.0 --skip-build
```

Packs the existing build output of each coded app. No dependency install and no `build` script run.

### Ignore specific analyzer rules

```bash
uip solution pack ./my-solution ./dist --version 1.2.0 --ignored-rules ST-USG-034,ST-MRD-002
```

The rules still run, but their findings do not fail the pack. The list is not applied when the tenant publishes an AutomationOps policy.

### Pack one project

```bash
uip solution pack ./my-solution ./dist --project MyProcess --package-id Acme.MyProcess --version 1.2.0
```

`--project` produces the project's `.nupkg` instead of the solution `.zip`, for example to publish one project to an Orchestrator feed on its own. `--name` names the solution `.zip`, so it cannot be used with `--project`; `--package-id` names the project package.

### Scripting — capture the output path for the publish step

```bash
PKG=$(uip solution pack ./my-solution ./dist --version 1.2.0 --output-filter "Packages" --output plain)
uip solution publish "$PKG"
```

## Data shape (--output json)

Real pack:

```json
{
  "Code": "SolutionPack",
  "Data": {
    "Package": "my-solution@1.2.0",
    "Packages": "./dist/my-solution_1.2.0.zip"
  }
}
```

- `Package` — `<name>@<version>` identifier for the packed solution.
- `Packages` — comma-separated list of `.zip` path(s) written to `<outputPath>`. Typically a single path.

Dry run (`--dry-run`):

```json
{
  "Code": "SolutionPack",
  "Data": {
    "Package": "my-solution@1.0.0",
    "DryRun": true,
    "Status": "Valid"
  }
}
```

When the pack fails and the packager reports per-project results, the failure envelope carries `Data.Projects`, one entry per member project:

| Field | Description |
|---|---|
| `Path` | The project directory, relative to the solution directory, with forward slashes. |
| `Type` | The project type. |
| `Result` | `Success` or `Failure`. |
| `Message` | The project's result message, when it has one. |
| `Findings` | The project's findings. Each finding can carry `Level`, `Source` (`Other`, `Analyzer`, `Validator`, or `Compiler`), `ErrorCode`, `RuleName`, `Description`, `FilePath`, `ActivityIdRef`, and `DocumentationLink`. |

`Data.Projects` is omitted when the failure belongs to no project.

With `--project`:

```json
{
  "Code": "SolutionPack",
  "Data": {
    "Package": "Acme.MyProcess@1.2.0",
    "Packages": "/home/me/dist/Acme.MyProcess.1.2.0.nupkg"
  }
}
```

- `Package` — `<package-id>@<version>` of the packed project.
- `Packages` — absolute path of the `.nupkg`.

## Project types

Pack hands each member project to the packager tool for its project type. Some project types have their own pack behavior:

| Project type | Pack behavior |
|---|---|
| Flow | The `.flow` file is checked against the Maestro designer's validation rules. A flow with errors fails the pack. Every issue, warnings included, is reported as a finding, with `ActivityIdRef` naming the node. |
| Business Rules | Packed as a `.uirule` archive named `<rule-name>-<version>.uirule`, holding the rule's `.dmn` files and an `entry-points.json` derived from them. |
| Data Fabric entities | Validated only: pack checks that every entity definition is intact and its schema is valid. For an entity authored with `--local`, pack also checks each relationship and choice-set field: a target that the solution does not hold (`REFERENCE_TARGET_NOT_FOUND`, `CHOICE_SET_NOT_FOUND`), or a target that was replaced under a new key (`STALE_REFERENCE`), fails the pack. The entity definition resources are the deployable payload, so no separate package is produced for the project. |
| Function (JavaScript or TypeScript) | `entry-points.json` and `bindings_v2.json` are generated from the project sources before the pack, as [`uip function pack`](./uip-function.md) does. Python Function projects are packed with the manifests on disk. |
| Coded app | Built before it is packed, unless `--skip-build` is passed. Refer to [Coded app builds](#coded-app-builds). |

### Coded app builds

Pack builds every coded app that has a `build` script in its `package.json`, then packs the folder that `config.bundlePath` in the app's `webAppManifest.json` names. The runner needs Node.js and the app's package manager on `PATH`.

The install and the build run in the folder that holds the app's `package.json`. Dependencies are installed only when `node_modules/` is missing. The lockfile selects the package manager, and the `build` script runs with the same one:

| Lockfile | Install command |
|---|---|
| `package-lock.json` or `npm-shrinkwrap.json` | `npm ci` |
| `pnpm-lock.yaml` | `pnpm install --frozen-lockfile` |
| `yarn.lock` | `yarn install --frozen-lockfile` |
| `bun.lock` or `bun.lockb` | `bun install --frozen-lockfile` |
| none | `npm install`, which writes a `package-lock.json` |

| Case | Behavior |
|---|---|
| Sources unchanged since the last build | The build is skipped. Pack keeps a fingerprint of the app's files in `.uipath-build.json` beside `package.json`, and builds again when a file changes, is added, or is removed, or when the bundle folder is gone. Add `.uipath-build.json` to `.gitignore`. |
| No `build` script, or no `package.json` | The existing bundle folder is packed as it is, and nothing is installed. |
| `--skip-build` | No install and no build run for any coded app. The existing bundle folder is packed, also when it is out of date. |
| `--dry-run` | The build runs in the temporary copy, and the solution folder is not changed. The copy leaves out `node_modules/`, so an app that needs a build installs its dependencies again. |
| `--project` | The one coded app that is packed is built. |

The install and the build run with the environment that `uip` was started with, so `PATH`, proxy, and registry settings apply. `UIPATH_CLI_AUTH_TOKEN` and `UIPATH_ACCESS_TOKEN` are removed from that environment.

## Failure modes

- **`--project` that does not resolve.** A project `Id` or path that is not in the `.uipx`, that matches more than one project, that points outside the solution folder, or that sits at the solution root is refused with `ErrorCode: invalid_argument`. The message lists the solution's project `Id` values and paths to pick from.
- **`--project` with a `.uis` file, or with `--name`.** Refused: `--project` packs a project out of a solution folder, and `--name` names the solution `.zip` that `--project` does not produce. `--package-id` names the project package.
- **`--package-id` without `--project`, or an empty `--project` or `--package-id`.** Refused.
- **Missing `outputPath` without `--dry-run`.** Fails with a pointer to provide an output directory or pass `--dry-run`.
- **Empty governance flag value.** An empty value for `--governance-file-path` or `--governance-product` is rejected.
- **Unusable governance policy file.** A `--governance-file-path` file that cannot be read or is not JSON fails the pack. So does a file that holds only the inner policy of an AutomationOps export; pass the exported file as-is.
- **Member package ID collision.** A member's package ID is composed as `<solution>.<project-type>.<member-folder>`, capped at 100 characters, and must be unique across the solution. Spaces and dots collapse to a single dot, and IDs are compared case-insensitively. When two members compose the same ID, the pack fails with `ErrorCode: invalid_argument`, naming the ID and the folders that produced it. The `<solution>` part is the `.uipx` file's own name; `--name` renames the archive only and does not change member IDs. Rename the member folder or the `.uipx`, then pack again.
- **Flow Extract document node with no processor.** An Extract document node that names no processor fails the pack with `ErrorCode: invalid_argument` and `Context.ErrorCode: idp_processor_unprovisioned`. `Instructions` names the `uip maestro flow nodes provision` command to run. Two nodes that author the same processor fail the pack with `Context.ErrorCode: idp_processor_duplicate_author`.
- **JavaScript or TypeScript Function project with no `uipath.json`.** Fails the pack with `ErrorCode: invalid_argument`. `Instructions` says to run `uip function init` in the project folder.
- **Project failure.** A project that fails compilation, validation, or analysis fails the pack. `Data.Projects` names the project and its findings.
- **Coded app build failure.** A `build` script that fails, or a package manager that is not on `PATH`, fails the pack with `ErrorCode: invalid_argument` and `Retry: RetryWillNotFix`. `Message` names the app folder, the command, its exit code, and the end of the build output. `Instructions` names the command to run in that folder.
- **Coded app dependency install failure.** Fails with `ErrorCode: execution_failed` and `Retry: RetryLater`, because the cause is often the package registry or the network. Pack again when the registry can be reached, or build the app in an earlier step and pass `--skip-build`.
- **Coded app with no build output.** A bundle folder that is missing, or that holds no HTML entry point, fails the pack with `ErrorCode: invalid_argument`. Without a `build` script, `Instructions` says to add one or to point `config.bundlePath` at the folder the app builds to. With `--skip-build`, `Instructions` says to build the app first.
- **Output path inside a member project directory.** Refused — anything written there would get packed into that project's own package on the next pack. Choose an output path outside the solution's project directories (for example `./out` at the solution root, or a directory outside the solution entirely).
- **Unpackable project type.** Names the project type and points at `uip tools search` / `uip tools install <tool>` to add the packager tool that handles it (or `uip update` first, if it's a newly added type).

## Related commands

- [`uip solution publish`](./uip-solution-publish.md) — uploads the packed `.zip` to the tenant solution feed.
- [`uip solution upload`](./uip-solution-upload.md) — alternative path that uploads the solution to Studio Web for interactive editing instead of packaging it for deployment.
- [`uip solution deploy run`](./uip-solution-deploy.md#uip-solution-deploy-run) — deploys a published package to Orchestrator.

## See also

- [Your first pipeline](./first-pipeline.md) — pack → publish → deploy run walkthrough.
- [`uip solution` overview](./uip-solution.md).
