cicd-integrations
2025.10
true
重要 :
请注意,此内容已使用机器翻译进行了部分本地化。 新发布内容的本地化可能需要 1-2 周的时间才能完成。
UiPath logo, featuring letters U and I in white

CI/CD 集成用户指南

上次更新日期 2025年11月5日

管理 NuGet 订阅源

本节介绍如何管理内置 NuGet 订阅源以及如何根据您的特定项目要求使用自定义 NuGet 订阅源。

这些订阅源配置同时适用于独立 RPA 项目解决方案

禁用内置 NuGet订阅源

默认情况下, uipcli在以下内置订阅源中搜索依赖项:

  • 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 (如果此路径位于当前代理上)
  • C:\Program Files (x86)\Microsoft SDKs\NuGetPackages (如果此路径位于当前代理上)

您可以通过设置--disableBuiltInNugetFeeds参数来指定uipcli不使用内置订阅源。此参数可与以下任务一起使用: analyzepacktest run 。当您使用配置文件运行uipcli时,请设置"disableBuiltInNugetFeeds": true

“禁用内置的 NuGet 订阅源”图像

“禁用内置的 NuGet 订阅源”图像

使用自定义 NuGet 订阅源

在打包 RPA 自动化项目或解决方案时,可以使用自定义订阅源。

在 UiPath CLI 中使用自定义 nuget.config

要使用自定义订阅源,请执行以下步骤:

  1. 使用以下格式创建自定义nuget.config文件:

    <?xml version="1.0" encoding="utf-8"?><configuration>  <packageSources>    <add key="test custom feed" value="custom_feed_url" />  </packageSources></configuration><?xml version="1.0" encoding="utf-8"?><configuration>  <packageSources>    <add key="test custom feed" value="custom_feed_url" />  </packageSources></configuration>
  2. 将自定义nuget.config文件放置在缓存uipcli的文件夹中:

    “在 UiPath CLI 中使用自定义 nuget.config”图像

在 Azure DevOps 中使用自定义 nuget.config

InstallPlatform步骤之后,您需要更新配置并将nuget.config复制到$(Agent.ToolsDirectory)/uipcli ,如以下示例所示:

trigger:- mainpool:  vmImage: ubuntu-lateststages:- 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'trigger:- mainpool:  vmImage: ubuntu-lateststages:- 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'

在 Jenkins 中使用自定义 nuget.config

InstallPlatform步骤之后,您需要更新配置并将nuget.config复制到${WORKSPACE}/CLI ,如以下示例所示:

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()                )            }        }    }}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()                )            }        }    }}

此页面有帮助吗?

获取您需要的帮助
了解 RPA - 自动化课程
UiPath Community 论坛
Uipath Logo
信任与安全
© 2005-2025 UiPath。保留所有权利。