# UiPath Solution Download Package

> The UiPath Solution Download Package task downloads a solution package from UiPath Orchestrator. This allows you to retrieve previously uploaded solution packages for backup, deployment to other environments, or local processing.

The UiPath Solution Download Package task downloads a solution package from UiPath Orchestrator. This allows you to retrieve previously uploaded solution packages for backup, deployment to other environments, or local processing.

:::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 Download Package inputs.

| Parameter | Description |
|-----------|-------------|
| **Orchestrator connection** (Required) | A service connection to the Orchestrator instance. |
| **Package Name** (Required) | The solution package name from Orchestrator. |
| **Package Version** | Optional. The solution package version from Orchestrator. If not specified, the latest version will be downloaded. |
| **Destination Path** (Required) | The local path where the downloaded package will be saved. |
| **Filename** | Optional. The local filename including extension where the downloaded package will be saved. Final path will concatenate Destination Path and Filename. |
| **Trace Level** | The trace logging level. Default: `Error`. Options: `None`, `Critical`, `Error`, `Warning`, `Information`, `Verbose` |

## Notes

- **Package retrieval**: This task downloads solution packages stored in Solutions Management in Orchestrator.
- **Version flexibility**: Can download specific versions or latest version when version is not specified.
- **Local storage**: Downloads packages to local file system for further processing or deployment.
- **Backup and recovery**: Useful for creating backups of solution packages or disaster recovery scenarios.
- **Cross-environment deployment**: Enables downloading packages from one environment for deployment to another.
- **File naming**: Supports custom filename specification or uses default naming from Orchestrator.
- **Orchestrator connection**: Requires a valid service connection to the source Orchestrator instance.
- **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.
- **Integration ready**: Downloaded packages can be used with upload or deploy tasks for environment promotion.

## Pipeline examples

### Basic package download

```yaml
- task: UiPathSolutionDownloadPackage@6
  displayName: 'Download Solution Package'
  inputs:
    orchestratorConnection: 'UiPath-Orchestrator-Connection'
    packageName: 'MySolution'
    destinationPath: '$(Build.ArtifactStagingDirectory)/downloads'
    traceLevel: 'Information'
```

### With Orchestrator connection and specific version

```yaml
- task: UiPathSolutionDownloadPackage@6
  displayName: 'Download Production Solution Package'
  inputs:
    orchestratorConnection: 'Production-Orchestrator'
    packageName: 'MyBusinessSolution'
    packageVersion: '2.1.$(Build.BuildNumber)'
    destinationPath: '$(Build.SourcesDirectory)/packages'
    filename: 'business-solution-backup.zip'
    traceLevel: 'Verbose'
```

### Complete pipeline:download and redeploy

```yaml
variables:
  solutionName: 'MyBusinessSolution'
  sourceEnvironment: 'Production'
  targetEnvironment: 'Staging'
  packageVersion: '1.$(Date:yyyy).$(DayOfYear)$(Rev:.r)'

steps:
- task: UiPathSolutionDownloadPackage@6
  displayName: 'Download Package from $(sourceEnvironment)'
  inputs:
    orchestratorConnection: 'Production-Orchestrator'
    packageName: '$(solutionName)'
    packageVersion: '$(packageVersion)'
    destinationPath: '$(Build.ArtifactStagingDirectory)/downloads'
    filename: '$(solutionName)-$(packageVersion).zip'
    traceLevel: 'Information'

- task: UiPathSolutionUploadPackage@6
  displayName: 'Upload Package to $(targetEnvironment)'
  inputs:
    orchestratorConnection: 'Staging-Orchestrator'
    solutionPackagePath: '$(Build.ArtifactStagingDirectory)/downloads/$(solutionName)-$(packageVersion).zip'
    traceLevel: 'Information'

- task: UiPathSolutionDeploy@6
  displayName: 'Deploy to $(targetEnvironment)'
  inputs:
    orchestratorConnection: 'Staging-Orchestrator'
    packageName: '$(solutionName)'
    packageVersion: '$(packageVersion)'
    deploymentName: '$(solutionName)-$(targetEnvironment)-$(Build.BuildNumber)'
    deploymentParentFolder: '$(targetEnvironment)'
    deploymentFolderName: 'BusinessProcesses'
    traceLevel: 'Information'

- script: echo "Successfully promoted $(solutionName) v$(packageVersion) from $(sourceEnvironment) to $(targetEnvironment)"
  displayName: 'Promotion Summary'
```
