# Managing NuGet feeds

> This page describes the three CLI parameters that control which NuGet feeds `uipcli` consults when resolving package dependencies, and shows how to use each one.

This page describes the three CLI parameters that control which NuGet feeds `uipcli` consults when resolving package dependencies, and shows how to use each one.

The same parameters apply to both **standalone RPA projects** and **Solutions**.

## How uipcli resolves feeds

By default, `uipcli` resolves packages from three sources, merged in this order:

1. **Built-in feeds** shipped with the CLI:
   * `https://pkgs.dev.azure.com/uipath/Public.Feeds/_packaging/UiPath-Official/nuget/v3/index.json`
   * `https://gallery.uipath.com/api/v2`
   * `https://api.nuget.org/v3/index.json`
   * `C:\Program Files\Microsoft SDKs\NuGetPackages` (if this path is on the current agent)
   * `C:\Program Files (x86)\Microsoft SDKs\NuGetPackages` (if this path is on the current agent)
2. **Host-level NuGet configuration** on the machine running the CLI, typically `%AppData%\NuGet\NuGet.Config` (user-level) and `%ProgramFiles(x86)%\NuGet\Config` (machine-level).
3. **A custom `nuget.config`** that you pass through `--nugetConfigFilePath`.

Three parameters let you customize this default resolution:

| Parameter | What it controls |
| --- | --- |
| [`--nugetConfigFilePath`](#adding-custom-feeds-with---nugetconfigfilepath) | Adds the feeds from a `nuget.config` file you supply. |
| [`--disableBuiltInNugetFeeds`](#disabling-built-in-feeds-with---disablebuiltinnugetfeeds) | Drops layer 1 (the built-in feeds). |
| [`--excludeConfiguredSources`](#restricting-to-custom-feeds-only-with---excludeconfiguredsources) | Drops layers 1 **and** 2. Only the `--nugetConfigFilePath` feeds remain. |

When you run `uipcli` with a configuration file, each parameter has a JSON-style equivalent: `"nugetConfigFilePath": "..."`, `"disableBuiltInNugetFeeds": true`, `"excludeConfiguredSources": true`.

## Adding custom feeds with `--nugetConfigFilePath`

`--nugetConfigFilePath` points the CLI at a `nuget.config` file whose `<packageSources>` you want included in the dependency resolution. This is the primary way to add a private feed (corporate ProGet, Artifactory, Azure Artifacts, internal Nexus, etc.) without modifying anything on the build agent.

The file follows the standard NuGet schema:

```xml
<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources>
    <add key="MyCustomFeed" value="https://my.corp.example/nuget/v3/index.json" />
  </packageSources>
</configuration>
```

Pass the path on the command line:

```bash
uipcli package pack "C:\projects\MyProject\project.json" -o "C:\Output" \
  --nugetConfigFilePath "C:\ci\nuget.config"
```

:::note
The CLI ignores the `<clear />` tag inside the file you pass through `--nugetConfigFilePath`. To exclude the built-in and host-level sources, use [`--excludeConfiguredSources`](#restricting-to-custom-feeds-only-with---excludeconfiguredsources) instead.
:::

### Alternative: place `nuget.config` in the CLI cache folder

If you prefer not to pass the parameter on every invocation, you can drop the `nuget.config` into the folder where `uipcli` is cached. The CLI picks it up automatically.

!['Using custom nuget.config in UiPath CLI' image](https://dev-assets.cms.uipath.com/assets/images/cicd-integrations/cicd-integrations-using-custom-nuget-config-in-uipath-cli-image-399916-7825b932.webp)

### Using a custom `nuget.config` in Azure DevOps

Copy `nuget.config` to `$(Agent.ToolsDirectory)/uipcli` after the `InstallPlatform` step:

```yaml
trigger:
- main

pool:
  vmImage: ubuntu-latest

stages:
- stage: Demo
  jobs:
    - job: Demo
      steps:
        - task: UiPathInstallPlatform@6
          inputs:
            cliVersion: '25.10'

        - task: CopyFiles@2
          inputs:
            SourceFolder: '$(Build.SourcesDirectory)'
            Contents: 'nuget.config'
            TargetFolder: '$(Agent.ToolsDirectory)/uipcli'

        - task: UiPathPack@6
          inputs:
            versionType: 'AutoVersion'
            projectJsonPath: '$(Build.SourcesDirectory)/project.json'
            outputPath: '$(Build.ArtifactStagingDirectory)/Output'
            traceLevel: 'Information'
```

### Using a custom `nuget.config` in Jenkins

Copy `nuget.config` to `${WORKSPACE}/CLI` after the `InstallPlatform` step:

```groovy
pipeline {
    agent {
        label 'jenkins-agent'
    }

    stages {
        stage('Clone') {
            steps {
                git (
                    branch: 'main',
                    url: 'https://github.com/your-org/your-repo.git'
                )
            }
        }

        stage('Install Platform') {
            steps {
                UiPathInstallPlatform (
                    cliVersion: '25.10',
                    traceLevel: 'Information'
                )
            }
        }

        stage('Copy nuget.config') {
            steps {
                bat 'copy nuget.config CLI\\nuget.config'
            }
        }

        stage('Pack') {
            steps {
                UiPathPack (
                    outputPath: '${WORKSPACE}/Output',
                    projectJsonPath: '${WORKSPACE}/project.json',
                    traceLevel: 'Information',
                    version: AutoVersion()
                )
            }
        }
    }
}
```

## Disabling built-in feeds with `--disableBuiltInNugetFeeds`

`--disableBuiltInNugetFeeds` removes UiPath's built-in feeds from the resolution. Host-level NuGet configuration and any feeds from `--nugetConfigFilePath` are still consulted.

Use this when:

- Your network blocks `pkgs.dev.azure.com`, `gallery.uipath.com`, or `api.nuget.org`, and you mirror the packages internally instead.
- You want a deterministic set of activity-package versions sourced from your own feed, not from `gallery.uipath.com`.

```bash
uipcli package pack "C:\projects\MyProject\project.json" -o "C:\Output" \
  --nugetConfigFilePath "C:\ci\nuget.config" \
  --disableBuiltInNugetFeeds
```

!['Disabling the built-in NuGet feeds' image](https://dev-assets.cms.uipath.com/assets/images/cicd-integrations/cicd-integrations-disabling-the-built-in-nuget-feeds-image-400515-803bba3d.webp)

!['Disabling the built-in NuGet feeds' image](https://dev-assets.cms.uipath.com/assets/images/cicd-integrations/cicd-integrations-disabling-the-built-in-nuget-feeds-image-400519-94e682f5.webp)

## Restricting to custom feeds only with `--excludeConfiguredSources`

`--excludeConfiguredSources` excludes both the built-in feeds and the NuGet sources configured at the user and machine level on the host running the CLI (typically `%AppData%\NuGet\NuGet.Config` and `%ProgramFiles(x86)%\NuGet\Config`). The CLI resolves packages only from the feeds defined in `--nugetConfigFilePath`.

Use this when:

- You want hermetic, reproducible builds where only the feeds you declare in version control are consulted.
- A shared build agent has machine-level feeds that you don't want bleeding into specific pipelines.
- You're debugging "works on agent A, fails on agent B" issues caused by divergent host-level NuGet configuration.

```bash
uipcli package pack "C:\projects\MyProject\project.json" -o "C:\Output" \
  --nugetConfigFilePath "C:\ci\nuget.config" \
  --excludeConfiguredSources
```

:::note
Make sure the `nuget.config` you pass with `--nugetConfigFilePath` declares every feed your project needs — including any UiPath feed equivalents — because no other source is consulted.
:::
