# Packing a Solution

> Pack a UiPath solution directory into a deployable solution package using the CLI.

The `pack` command creates a deployable Solution package (`.zip` archive) that can be uploaded to Solutions in Orchestrator.

## Command syntax

```bash
uipcli solution pack <solution-path> [options]
```

### Parameters

| Parameter | Description | Required |
|-----------|-------------|----------|
| `<solution-path> (pos. 0)` | Path to Solution folder or `.uipx` file | Yes |
| `--output` | Directory where the package will be created | Yes |
| `--version` | Version number in `x.y.z` format | **Yes** |
| `--nugetConfigFilePath` | Path to the `NuGet.Config` file used during restore. From 25.10.18 onwards the file is honored end-to-end — `<clear />`, `<packageSourceCredentials>`, `<packageSourceMapping>`, and `<fallbackPackageFolders>` all take effect. See [Managing NuGet feeds](https://docs.uipath.com/cicd-integrations/standalone/2025.10/user-guide/managing-nuget-feeds#adding-custom-feeds-with---nugetconfigfilepath). On older builds, only `<packageSources>` URLs were applied. | No |
| `--disableBuiltInNugetFeeds` | Disable built in nuget feeds. | No |
| `--excludeConfiguredSources` | Excludes the built-in feeds and the NuGet sources configured at the user and machine level on the host running the CLI. The CLI resolves packages only from the feeds defined in `--nugetConfigFilePath`. See [Managing NuGet feeds](https://docs.uipath.com/cicd-integrations/standalone/2025.10/user-guide/managing-nuget-feeds#restricting-to-custom-feeds-only-with---excludeconfiguredsources). | No |
| `-A`, `--libraryOrchestratorAccountForApp` (*) | The Orchestrator CloudRPA account name(organization name). You must pair it with the **Application ID**,**Application Secret**, and **Application scope** for external application  This is required if any Solution project depends on libraries from the Orchestrator feed or on another process deployed to Orchestrator. | No |
| `-I` ,`--libraryOrchestratorApplicationId` (*)  (**Required** if you use [external application authentication](https://docs.uipath.com/automation-cloud/automation-cloud/latest/admin-guide/managing-external-applications)) | The external Application ID. You must pair it with the **Application Account**, **Application Secret**, and **Application scope**. This is required if any Solution project depends on libraries from the Orchestrator feed or on another process deployed to Orchestrator. | No |
| `-S`, `--libraryOrchestratorApplicationSecret` (*)  (**Required** if you use [external application authentication](https://docs.uipath.com/automation-cloud/automation-cloud/latest/admin-guide/managing-external-applications)) | The external Application Secret. You must pair it with the **Application Account**, **Application ID**, and **Application scope**.  This is required if any Solution project depends on libraries from the Orchestrator feed or on another process deployed to Orchestrator. | No |
| `--libraryOrchestratorApplicationScope` (*)  (**Optional** for [external application authentication](https://docs.uipath.com/automation-cloud/automation-cloud/latest/admin-guide/managing-external-applications)) | The list of application scopes, separated by single spaces. You must pair it with the **Application Account**, **Application ID**, and **Application Secret** for external application.  This is required if any Solution project depends on libraries from the Orchestrator feed or on another process deployed to Orchestrator. | No |
| `--libraryOrchestratorUrl` (*) | The URL of the Orchestrator instance. This is required if any Solution project depends on libraries from the Orchestrator feed or on another process deployed to Orchestrator.| No |
| `--libraryOrchestratorTenant` (*) | The tenant of the Orchestrator instance. This is required if any Solution project depends on libraries from the Orchestrator feed or on another process deployed to Orchestrator.| No |
| `--libraryIdentityUrl` | The URL of your identity server. Required when the library Orchestrator runs on **UiPath Automation Suite** or **standalone Orchestrator** (on-premises MSI). Not needed for **Automation Cloud** — the CLI resolves the identity server from the cloud URL. | No |
| `--libraryOrchestratorFolder` (*) | The name of the target Orchestrator folder.  To input subfolders make sure to input both the parent folder name and the name of the subfolder. For instance, use `AccountingTeam\TeamJohn`. | No |
| `--repositoryUrl` | The repository URL where the project is versioned. | No |
| `--repositoryCommit` | The repository commit where the project was built from. | No |
| `--repositoryBranch` | The repository branch where the project was built from. | No |
| `--repositoryType` | VCS system repository type. | No |
| `--projectUrl` | Automation Hub idea URL. | No |
| `--releaseNotes` | Add release notes. | No |
| `--author` | The package author. | No |
| `--traceLevel` | Display the trace of the events. | No |
| `--ca-cert` | Trusted root CA file(s) (PEM, DER, or PKCS#7) for the library Orchestrator/Identity TLS certificate. Repeat or comma-separate. See [Trusting custom certificates](https://docs.uipath.com/cicd-integrations/standalone/2025.10/user-guide/trusting-custom-certificates). | No |
| `--pinnedpubkey` | Pin the leaf public key (`sha256//<base64>`). See [Trusting custom certificates](https://docs.uipath.com/cicd-integrations/standalone/2025.10/user-guide/trusting-custom-certificates). | No |

:::tip Trusting custom certificates
For library Orchestrator instances signed by a private Certificate Authority (such as UiPath Automation Suite), this command also accepts `--ca-cert` and `--pinnedpubkey` parameters. See [Trusting custom certificates](https://docs.uipath.com/cicd-integrations/standalone/2025.10/user-guide/trusting-custom-certificates) for scenarios and examples.
:::

:::note Default Application Scopes
When using external application authentication without specifying the `--libraryOrchestratorApplicationScope` parameter, the CLI automatically applies these default Orchestrator scopes:

`Solutions.Packages Solutions.Deployments OR.Execution`
:::

## Example

```bash
uipcli solution pack C:\Solutions\MySolution \
  --output C:\Output \
  --version 1.2.3 \
  --traceLevel Verbose
```

This creates a package file like:
```
C:\Output\MySolution.1.2.3.zip
```

### Full parameter example

```bash
uipcli solution pack C:\Solutions\MySolution \
  --output C:\Output \
  --version 1.2.3 \
  --libraryOrchestratorAccountForApp MyOrgAccount \
  --libraryOrchestratorApplicationId ******* \
  --libraryOrchestratorApplicationSecret ******* \
  --libraryOrchestratorApplicationScope "OR.Assets OR.Folders OR.Projects" \
  --libraryOrchestratorUrl https://cloud.uipath.com/myOrgName/myTenantName \
  --libraryOrchestratorTenant myTenantName \
  --libraryIdentityUrl https://identity.uipath.com \
  --libraryOrchestratorFolder "AccountingTeam\TeamJohn" \
  --disableBuiltInNugetFeeds \
  --repositoryUrl https://github.com/my-org/my-repo \
  --repositoryCommit 7f3a9c2 \
  --repositoryBranch main \
  --repositoryType git \
  --projectUrl https://automationhub.uipath.com/ideas/1234 \
  --releaseNotes "Initial packaged solution version" \
  --traceLevel Verbose
  --author ExampleAuthor
```

## Versioning requirement

Unlike standalone projects, Solutions do not auto-increment their version number. You must explicitly provide a version using the `--version` parameter.

### Typical versioning patterns in CI/CD

Most teams generate the version dynamically based on build metadata:

#### Using build ID
```bash
--version "1.0.$BUILD_ID"
```

#### Using Git commit SHA
```bash
--version "2.1.${GIT_COMMIT_SHA:0:7}"
```

#### Using semantic versioning with date
```bash
--version "$(date +%Y.%m.$BUILD_NUMBER)"
```

### Version format

The version must follow semantic versioning:
- Format: `MAJOR.MINOR.PATCH`
- Example: `1.0.0`, `2.3.45`, `10.20.1234`
- Must contain exactly three numeric components separated by dots

## Pipeline integration

### Azure DevOps example

```yaml
- script: |
    uipcli solution pack $(Build.SourcesDirectory)\MySolution \
      --output $(Build.ArtifactStagingDirectory) \
      --version "1.0.$(Build.BuildId)" \
      --traceLevel Information
  displayName: 'Pack Solution'
```

### GitHub Actions example

```yaml
- name: Pack Solution
  run: |
    uipcli solution pack ${{ github.workspace }}/MySolution \
      --output ${{ runner.temp }}/packages \
      --version "1.0.${{ github.run_number }}" \
      --traceLevel Information
```

## What gets packaged

The pack command bundles:

- All projects included in the Solution
- Project-level dependencies
- Solution metadata and configuration
- Binding definitions for environment-specific settings

The resulting `.zip` file is self-contained and ready to be uploaded to Orchestrator.

## Packaging after restore

For best results, run `restore` before `pack` to ensure all dependencies are resolved:

```bash
# 1. Restore dependencies
uipcli solution restore C:\Solutions\MySolution \
  --restoreFolder C:\Output\Dependencies \
  --traceLevel Information

# 2. Pack with explicit version
uipcli solution pack C:\Solutions\MySolution \
  --output C:\Output \
  --version 1.2.3 \
  --traceLevel Verbose
```

## Package output location

The packaged `.zip` file is placed in the directory specified by `--output`. If the directory doesn't exist, it will be created automatically.

### Typical output paths

#### Azure DevOps
```bash
--output $(Build.ArtifactStagingDirectory)
```

#### GitHub Actions
```bash
--output ${{ runner.temp }}/packages
```

#### Jenkins
```bash
--output ${WORKSPACE}/output
```

## Next steps

After packing, you can:

1. [Upload the package](https://docs.uipath.com/cicd-integrations/standalone/2025.10/user-guide/uploading-and-deleting-solution-packages) to Solutions Management.
2. Store it as a build artifact in your CI/CD platform.
3. Version it in an artifact repository (Artifactory, Azure Artifacts, etc.).
