# UiPath Solution Pack

> The UiPath Solution Pack task packages an existing UiPath solution archived file into a deployable package that can be uploaded to Solutions Management in Orchestrator.

The UiPath Solution Pack task packages an existing UiPath solution archived file into a deployable package that can be uploaded to Solutions Management in Orchestrator.

:::note
Solutions are currently supported only in Automation Cloud. Support for Automation Suite is planned for a future release. On-premises (MSI) Orchestrator does not support Solutions.
:::

:::note
This task is compatible only with `UiPath.CLI.Windows` or `UiPath.CLI.Linux` at least version 25.10 or higher.
:::

## Configuration

Use the following table to configure the UiPath Solution Pack inputs.

| Parameter | Description |
|-----------|-------------|
| **Solution Path** (Required) | The local path of the solution. It can be a direct path to a solution.uipx file or a solution directory. |
| **Version** (Required) | Specifying the solution package version provides the possibility of tracking the built packages and their source versioning more efficiently. For example, the Microsoft assembly pattern can be utilized to build the NuGet package version: [Major].[Minor].[BuildNumber].[RevisionNumber] |
| **Output Path** (Required) | Path to a folder, where the created package should be placed. Default: `$(Build.ArtifactStagingDirectory)\Output` |
| **Disable Built-In NuGet Feeds** | Disable Built-In NuGet Feeds. Default: `false` |
| **Source code version information and Automation Hub Idea URL** | Enable package metadata including source code version information and Automation Hub Idea URL. Default: `false` |
| **The full path to project.json within the remote repository** | The full path to project.json within the remote repository. Only visible when package metadata is enabled. |
| **The commit id** | The commit id for source code tracking. Only visible when package metadata is enabled. |
| **The repository branch** | The repository branch for source code tracking. Only visible when package metadata is enabled. |
| **The type of the repository (e.g: git)** | The type of the repository (e.g: git). Only visible when package metadata is enabled. |
| **Automation Hub Idea URL** | Automation Hub Idea URL for linking to the original automation idea. Only visible when package metadata is enabled. |
| **Release Notes** | Release notes for the package version. Only visible when package metadata is enabled. |
| **Orchestrator connection** | A service connection to an Orchestrator instance that has on its feed dependencies of the project(s) to be packed. Usually used for packing libraries. The Orchestrator must be 20.4 or higher. |
| **Run workflow analysis** | Run the workflow analysis before packing and fail in case of errors. Default: `false` |
| **Governance File Path** | Pass governance policies containing the Workflow Analyzer rules. Policies can be downloaded from Automation Ops, or extracted from the exported compressed zip file from Studio. For details, please consult the documentation. Only visible when workflow analysis is enabled. |
| **Trace Level** | The trace logging level. Default: `Error`. Options: `None`, `Critical`, `Error`, `Warning`, `Information`, `Verbose` |

## Notes

- **Solution packaging**: This task creates deployable packages from UiPath solutions that can be uploaded to Solutions Management in Orchestrator.
- **Version requirement**: Unlike standalone projects, solutions require explicit version specification using semantic versioning.
- **Orchestrator dependencies**: When packaging libraries or projects with dependencies from Orchestrator feeds, configure the Orchestrator connection parameter.
- **Workflow analysis**: Enable workflow analysis to validate your solution against governance policies before packaging.
- **Metadata tracking**: Enable package metadata to include source code information and links to Automation Hub ideas for better traceability.
- **Output format**: The task creates a packaged solution file in the specified output directory with naming pattern: `{SolutionName}.{Version}.zip`.
- **CLI compatibility**: This task uses the UiPath CLI internally and requires proper CLI installation on the build agent.
- **Minimum CLI version**: Requires UiPath CLI version 25.10 or higher for full compatibility.

## Pipeline examples

### Basic solution packaging

```yaml
- task: UiPathSolutionPack@6
  displayName: 'Pack Solution'
  inputs:
    solutionPath: '$(Build.SourcesDirectory)/MySolution'
    version: '1.0.$(Build.BuildId)'
    outputPath: '$(Build.ArtifactStagingDirectory)/Output'
    traceLevel: 'Information'
```

### With Orchestrator connection

```yaml
- task: UiPathSolutionPack@6
  displayName: 'Pack Solution with Orchestrator Dependencies'
  inputs:
    solutionPath: '$(Build.SourcesDirectory)/MyLibrarySolution'
    version: '2.1.$(Build.BuildNumber)'
    outputPath: '$(Build.ArtifactStagingDirectory)/Packages'
    orchestratorConnection: 'UiPath-Orchestrator-Connection'
    runWorkflowAnalysis: true
    governanceFilePath: '$(Build.SourcesDirectory)/governance/policies.json'
    traceLevel: 'Verbose'
```

### Complete pipeline with metadata and governance

```yaml
variables:
  solutionVersion: '1.$(Date:yyyy).$(DayOfYear)$(Rev:.r)'

steps:
- task: UiPathSolutionPack@6
  displayName: 'Pack Solution with Full Metadata'
  inputs:
    solutionPath: '$(Build.SourcesDirectory)/MyBusinessSolution'
    version: '$(solutionVersion)'
    outputPath: '$(Build.ArtifactStagingDirectory)'
    disableBuiltInNugetFeeds: false
    enablePackageMetadata: true
    repositoryUrl: '$(Build.Repository.Uri)/$(Build.SourcesDirectory)/MyBusinessSolution/project.json'
    repositoryCommit: '$(Build.SourceVersion)'
    repositoryBranch: '$(Build.SourceBranchName)'
    repositoryType: 'git'
    projectUrl: 'https://cloud.uipath.com/automationhub/idea/12345'
    releaseNotes: 'Automated build $(Build.BuildNumber) - Added new features and bug fixes'
    orchestratorConnection: 'Production-Orchestrator'
    runWorkflowAnalysis: true
    governanceFilePath: '$(Build.SourcesDirectory)/governance/workflow-analyzer-rules.json'
    traceLevel: 'Information'

- task: PublishBuildArtifacts@1
  displayName: 'Publish Solution Package'
  inputs:
    pathToPublish: '$(Build.ArtifactStagingDirectory)'
    artifactName: 'SolutionPackage'
```
