uipath-solution

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

UiPath Solution —
uip solution
lifecycle

UiPath Solution —
uip solution
生命周期

Create, pack, publish, deploy, and manage UiPath Solution packages (
.uipx
) via the
uip solution
CLI surface. A Solution bundles multiple automation projects (processes, libraries, tests, agent projects, API workflows) into a single deployable unit.
Use the CLI. Don't roll your own REST for solution ops. Hand-rolling HTTP calls misses the
X-UIPATH-OrganizationUnitId
folder header, OData filter shape, pagination envelope,
pipelinesInstall
deploy semantics, retry behavior, and the
Result/Code/Data
output contract. The CLI is the source of truth.
Platform support. Solutions runs on Automation Cloud and on self-hosted Automation Suite from
2.2510.0
onward
; not on Standalone Orchestrator. Available project types vary by AS version (Maestro self-hosted only from
2.2510.2
). Compat matrix + project-type-by-version table → Solution Overview — Platform availability.
通过
uip solution
CLI界面创建、打包、发布、部署和管理UiPath Solution包(
.uipx
)。一个Solution可将多个自动化项目(流程、库、测试、代理项目、API工作流)捆绑为一个单一的可部署单元。
**请使用CLI。不要自行编写REST接口处理解决方案操作。**手动编写HTTP调用会遗漏
X-UIPATH-OrganizationUnitId
文件夹头、OData筛选器格式、分页信封、
pipelinesInstall
部署语义、重试机制以及
Result/Code/Data
输出约定。CLI是权威实现。
**平台支持。**Solutions可在Automation Cloud和自托管Automation Suite 版本
2.2510.0
及以上
运行;不支持Standalone Orchestrator。支持的项目类型因AS版本而异(Maestro自托管版本从
2.2510.2
开始支持)。兼容性矩阵及按版本划分的项目类型表 → Solution Overview — Platform availability

When to Use This Skill

何时使用该技能

  • User has a
    .uipx
    solution and wants to pack / publish / deploy / activate / upload
  • User wants to create a new solution (
    uip solution init
    ), add or remove projects, or refresh solution resources
  • User asks to set up a CI/CD pipeline that builds, publishes, and deploys a UiPath solution
  • User mentions deploy configs, environment promotion, or activating a deployed solution
  • A skill or main agent detected a
    .uipx
    file and redirected the user here
Skip this skill when:
  • The task is PDD → SDD architecture/design (sdd.md / pdd.md) — load
    uipath-planner
    .
  • The deployable is a single non-solution package (e.g., a one-off RPA library or coded app) — those use
    uip rpa publish
    /
    uip codedapp publish
    and route through
    uipath-platform
    or the relevant specialist.
  • The task is non-solution Orchestrator work (folders, jobs, assets, queues, IS connections) — load
    uipath-platform
    .
  • 用户拥有
    .uipx
    解决方案,需要进行打包/发布/部署/激活/上传操作
  • 用户想要创建新解决方案(
    uip solution init
    )、添加或移除项目,或刷新解决方案资源
  • 用户询问如何搭建用于构建、发布和部署UiPath解决方案的CI/CD流水线
  • 用户提及部署配置、环境升级或激活已部署的解决方案
  • 某个技能或主代理检测到
    .uipx
    文件并将用户引导至此处
跳过该技能的场景:
  • 任务涉及PDD→SDD架构/设计(sdd.md / pdd.md)——请加载
    uipath-planner
  • 可部署对象为单个非解决方案包(例如,一次性RPA库或编码应用)——这些场景使用
    uip rpa publish
    /
    uip codedapp publish
    ,并通过
    uipath-platform
    或相关专业技能处理。
  • 任务涉及非解决方案的Orchestrator操作(文件夹、作业、资产、队列、IS连接)——请加载
    uipath-platform

CLI Surface Probe

CLI界面探测

Before the first
uip solution …
command in a session, probe the
solution
surface to detect pre- vs post-rename CLI:
bash
uip solution init --help --output json
  • Result
    Success
    → post-rename CLI (default). Use the commands and flags as documented in the references.
  • unknown command
    / non-zero exit → pre-rename CLI. Translate via the table below before each call. Re-probe on any later
    unknown command
    error.
  • command not found
    /
    uip: not found
    /
    'uip' is not recognized
    → CLI not installed. Tell the user to run
    npm install -g @uipath/cli
    , then
    uip login
    , and abort the work until those succeed.
Post-rename (default)Pre-rename equivalent
uip solution init <NAME>
uip solution new <NAME>
uip solution deploy run --parent-folder-path <PATH>
uip solution deploy run --folder-path <PATH>
uip solution deploy run --parent-folder-key <KEY>
uip solution deploy run --folder-key <KEY>
All other
solution
subcommands (
pack
,
publish
,
deploy activate/status/uninstall
,
upload
,
resource …
,
project add/import
) are unchanged on both surfaces.
在会话中首次执行
uip solution …
命令前,请探测
solution
界面以识别重命名前后的CLI版本:
bash
uip solution init --help --output json
  • 返回
    Success
    → 重命名后的CLI(默认版本)。请按照参考文档使用命令和参数。
  • 返回
    unknown command
    / 非零退出码 → 重命名前的CLI。在每次调用前请通过下表进行转换。若后续出现
    unknown command
    错误,请重新探测。
  • 返回
    command not found
    /
    uip: not found
    /
    'uip' is not recognized
    → CLI未安装。请告知用户运行
    npm install -g @uipath/cli
    ,然后执行
    uip login
    ,在完成这些操作前终止当前任务。
重命名后(默认)重命名前等效命令
uip solution init <NAME>
uip solution new <NAME>
uip solution deploy run --parent-folder-path <PATH>
uip solution deploy run --folder-path <PATH>
uip solution deploy run --parent-folder-key <KEY>
uip solution deploy run --folder-key <KEY>
所有其他
solution
子命令(
pack
publish
deploy activate/status/uninstall
upload
resource …
project add/import
)在两个版本中均保持不变。

Critical Rules

关键规则

  1. Probe the CLI surface before the first
    uip solution
    command in a session.
    Run
    uip solution init --help --output json
    .
    Success
    = post-rename CLI (default);
    unknown command
    = pre-rename CLI — translate via the fallback table above. Re-probe on any later
    unknown command
    error.
  2. Always use
    --output json
    for
    uip solution
    commands whose output you parse. JSON is compact and stable; the default for non-interactive runs.
  3. Use the CLI, never roll your own REST for solution operations. Hand-rolled HTTP calls miss the
    X-UIPATH-OrganizationUnitId
    header, OData filter shape, pagination envelope, and
    pipelinesInstall
    deploy semantics. Only fall through to REST after confirming no
    uip solution
    command covers the task.
  4. Never hand-edit
    resources/solution_folder/
    .
    It's auto-generated by
    uip solution projects add
    /
    import
    and auto-cleaned by
    project remove
    . Manual edits desync from
    .uipx
    and produce silent failure modes. See scenarios/manual-edits.md.
  5. .uipx
    and
    resources/solution_folder/
    must always agree on the project set.
    Diffing them is the fastest way to detect corrupted state. If they disagree, fix via
    uip solution projects add/remove
    — never by editing either side directly.
  6. Run
    uip solution resources refresh
    before
    pack
    or
    upload
    .
    Bundled artefact files and
    userProfile/<userId>/debug_overwrites.json
    must reflect current cloud state. Skipping refresh ships stale bindings.
  7. AppV2 coded apps register in
    .uipx
    when authored inside a solution.
    uip codedapp init
    is the solution-side scaffolding entry point — run it from inside a
    .uipx
    solution
    . It writes
    project.uiproj
    (
    ProjectType: "AppV2"
    ) +
    webAppManifest.json
    , nests source under
    source/dist/
    , and auto-registers as
    Type: "AppV2"
    — emitting
    resources/solution_folder/app/{Coded,CodedAction}/
    .
    uip solution projects add
    /
    uip solution projects import
    cover existing AppV2 folders too — both read
    webAppManifest.config.isActionApp
    to pick
    Coded
    /
    CodedAction
    subType (defaults
    Coded
    for legacy folders with no manifest).
    uip solution pack
    bundles them;
    uip solution deploy run
    provisions them. Standalone coded apps are a different lifecycle — scaffold them with
    npx create-vite@latest
    (not
    uip codedapp init
    ), keep a flat
    dist/
    at the project root, and deploy via
    uip codedapp pack
    uip codedapp publish
    uip codedapp deploy
    . See /uipath:uipath-coded-apps.
  8. Verify the artifact after every CLI mutation. Read
    project.json
    ,
    .uipx
    , or
    uip solution deploy status
    output — exit codes lie. Verification is additional; it does not replace requested read-only list commands. If the user asks to show or list registered projects, solution resources, packages, deployments, or statuses, run the matching
    uip solution ... list/status --output json
    command and then inspect files only as a secondary sanity check.
  9. For multi-environment promotion, switch tenants with
    uip login tenant set <tenant>
    and pass a per-environment deploy config via
    --config-file <path>
    .
    The same packed
    .uipx
    deploys to dev/staging/prod — the environment differs by the target tenant and the config file (generated with
    deploy config get
    , edited with
    config set
    /
    config link
    ), not by a different package. There is no
    -c <CONFIG_KEY>
    flag.
  1. **在会话中首次执行
    uip solution
    命令前,必须探测CLI界面。**执行
    uip solution init --help --output json
    。返回
    Success
    表示重命名后的CLI(默认);返回
    unknown command
    表示重命名前的CLI——请通过上述回退表进行转换。若后续出现
    unknown command
    错误,请重新探测。
  2. 始终使用
    --output json
    参数
    处理需要解析输出的
    uip solution
    命令。JSON格式紧凑且稳定,是非交互式运行的默认选择。
  3. **使用CLI,切勿自行编写REST接口处理解决方案操作。**手动编写的HTTP调用会遗漏
    X-UIPATH-OrganizationUnitId
    头、OData筛选器格式、分页信封以及
    pipelinesInstall
    部署语义。只有在确认没有对应的
    uip solution
    命令可完成任务时,才使用REST接口。
  4. **切勿手动编辑
    resources/solution_folder/
    目录。**该目录由
    uip solution projects add
    /
    import
    自动生成,并由
    project remove
    自动清理。手动编辑会导致与
    .uipx
    不同步,产生静默故障模式。详情请参阅scenarios/manual-edits.md
  5. **
    .uipx
    resources/solution_folder/
    必须始终保持项目集一致。**对比两者是检测损坏状态的最快方式。若两者不一致,请通过
    uip solution projects add/remove
    修复——切勿直接编辑任何一方。
  6. **在执行
    pack
    upload
    前,务必运行
    uip solution resources refresh
    。**捆绑的工件文件和
    userProfile/<userId>/debug_overwrites.json
    必须反映当前云状态。跳过刷新步骤会导致部署过期的绑定。
  7. AppV2编码应用在解决方案内创建时会注册到
    .uipx
    中。
    uip codedapp init
    是解决方案侧的脚手架入口点——请在**
    .uipx
    解决方案内部运行该命令。它会生成
    project.uiproj
    ProjectType: "AppV2"
    )+
    webAppManifest.json
    ,将源代码嵌套在
    source/dist/
    下,并自动注册为
    Type: "AppV2"
    ——生成
    resources/solution_folder/app/{Coded,CodedAction}/
    目录。
    uip solution projects add
    /
    uip solution projects import
    也支持现有AppV2文件夹——两者都会读取
    webAppManifest.config.isActionApp
    来选择
    Coded
    /
    CodedAction
    子类型(对于没有清单的旧文件夹,默认选择
    Coded
    )。
    uip solution pack
    会捆绑这些应用;
    uip solution deploy run
    会部署它们。独立编码应用的生命周期
    不同**——请使用
    npx create-vite@latest
    (而非
    uip codedapp init
    )搭建脚手架,在项目根目录保留扁平的
    dist/
    目录,并通过
    uip codedapp pack
    uip codedapp publish
    uip codedapp deploy
    进行部署。详情请参阅/uipath:uipath-coded-apps
  8. **每次CLI变更后都要验证工件。**读取
    project.json
    .uipx
    uip solution deploy status
    的输出——退出码可能存在误导。验证是额外步骤,不能替代请求的只读列表命令。若用户要求显示或列出已注册的项目、解决方案资源、包、部署或状态,请执行对应的
    uip solution ... list/status --output json
    命令,然后仅将文件检查作为二次 sanity 检查。
  9. **对于多环境升级,请使用
    uip login tenant set <tenant>
    切换租户,并通过
    --config-file <path>
    传递每个环境的部署配置。**同一个打包后的
    .uipx
    可部署到开发/预发布/生产环境——环境差异体现在目标租户和配置文件(通过
    deploy config get
    生成,通过
    config set
    /
    config link
    编辑),而非不同的包。不存在
    -c <CONFIG_KEY>
    参数。

Workflow

工作流程

The typical lifecycle for a UiPath Solution:
1. init / project add  → Create solution, register projects (.uipx + resources/solution_folder/)
2. resources refresh   → Sync bundled artefacts and debug overwrites with cloud state
3. (optional) restore  → Resolve NuGet deps in place (incl. authenticated Orchestrator feeds); login first
4. pack                → Produce deployable .zip package
5. login               → uip login (if not already authenticated)
6. publish             → Upload packed solution to UiPath
7. deploy run          → Promote to Orchestrator (auto-activates by default)
8. (optional) activate → Use --skip-activate on deploy, then activate explicitly
restore
is an optimization, not a requirement.
pack
restores dependencies internally, so a separate
restore
step is only useful when you want deps resolved up front — most often in CI (
login → restore → pack
) to fail fast on a missing feed before the heavier pack runs.
restore
takes a
<solutionPath>
only (solution dir with a
.uipx
, or a
.uis
file), resolves deps in place, and does not produce a package. It needs an authenticated session to reach private Orchestrator feeds, so run
uip login
before it.
AppV2 coded apps in the solution flow through
uip solution
, not
uip codedapp
directly.
When a coded-app project has
Type: "AppV2"
in
.uipx
,
uip solution pack
bundles its
.nupkg
and
uip solution deploy run
provisions it in the deployment folder — no separate
uip codedapp pack
/
publish
/
deploy
step. Standalone coded apps (scaffolded outside any solution via
npx create-vite
, flat
dist/
at the project root, no
project.uiproj
/
webAppManifest.json
) use the direct
codedapp
path instead. See
uipath-coded-apps
for the standalone lifecycle and for authoring an AppV2 project inside a solution via
uip codedapp init
.
Two distinct distribution paths from the same source:
  • pack
    publish
    deploy run
    — promotes a versioned package to Orchestrator.
  • upload
    — pushes the solution to Studio Web for browser-based debugging only. Does not produce a published package and cannot be deployed via
    deploy run
    .
Authentication is a prerequisite. Check
uip login status --output json
before any work; if not logged in, ask the user to run
uip login
(interactive browser flow). See
uipath-platform
for full auth options (interactive OAuth, client credentials, tenant switching).
This skill is the terminal step of an SDD-driven build: after
uipath-planner
produces the SDD and derives the task list, and implementation specialists build the projects, the
.uipx
is packed and shipped here.
UiPath Solution的典型生命周期:
1. init / project add  → 创建解决方案,注册项目(.uipx + resources/solution_folder/)
2. resources refresh   → 将捆绑的工件和调试覆盖配置与云状态同步
3.(可选)restore  → 就地解析NuGet依赖(包括已认证的Orchestrator源);需先登录
4. pack                → 生成可部署的.zip包
5. login               → uip login(若未已认证)
6. publish             → 将打包后的解决方案上传至UiPath
7. deploy run          → 部署到Orchestrator(默认自动激活)
8.(可选)activate → 在部署时使用--skip-activate参数,然后显式激活
restore
是优化步骤,非必需。
pack
会在内部自动恢复依赖,因此单独的
restore
步骤仅在需要提前解析依赖时有用——最常见于CI环境(
login → restore → pack
),以便在执行更耗时的pack步骤前快速检测缺失的源。
restore
仅接受
<solutionPath>
参数(包含
.uipx
的解决方案目录或
.uis
文件),就地解析依赖,不会生成包。它需要已认证的会话才能访问私有Orchestrator源,因此请在执行前运行
uip login
**解决方案中的AppV2编码应用通过
uip solution
处理,而非直接使用
uip codedapp
。**当编码应用项目在
.uipx
中注册为
Type: "AppV2"
时,
uip solution pack
会捆绑其
.nupkg
uip solution deploy run
会在部署文件夹中部署它——无需单独执行
uip codedapp pack
/
publish
/
deploy
步骤。独立编码应用(通过
npx create-vite
在解决方案外搭建脚手架,项目根目录为扁平的
dist/
,无
project.uiproj
/
webAppManifest.json
)则直接使用
codedapp
流程。有关独立生命周期以及如何通过
uip codedapp init
在解决方案内创建AppV2项目,请参阅
uipath-coded-apps
同一源代码有两种不同的分发路径:
  • pack
    publish
    deploy run
    —— 将版本化的包部署到Orchestrator。
  • upload
    —— 将解决方案推送到Studio Web,仅用于基于浏览器的调试。不会生成已发布的包,也无法通过
    deploy run
    部署。
认证是前提条件。在执行任何操作前,请检查
uip login status --output json
;若未登录,请告知用户运行
uip login
(交互式浏览器流程)。有关完整的认证选项(交互式OAuth、客户端凭证、租户切换),请参阅
uipath-platform
该技能是SDD驱动构建的最终步骤:在
uipath-planner
生成SDD并推导任务列表,实现专家完成项目构建后,
.uipx
会被打包并提交至此处处理。

Reference Navigation

参考导航

FilePurpose
Solution OverviewWhat a Solution is,
.uipx
manifest, file structure, lifecycle diagram, command tree
Develop a Solution
uip solution init / project add / import / remove / resources refresh / resources add / resources remove / resources edit
; field-tested gotchas
Pack and Deploy
restore / pack / publish / deploy run
, deploy configs, CI/CD pipeline patterns
Activate and Manage
deploy activate / status / uninstall
, environment management
Scenarios IndexFailure modes and edge cases — manual edits, shared resources, virtual resources, name collisions
文件用途
Solution Overview介绍Solution是什么、
.uipx
清单、文件结构、生命周期图、命令树
Develop a Solution讲解
uip solution init / project add / import / remove / resources refresh / resources add / resources remove / resources edit
命令;经实践验证的注意事项
Pack and Deploy讲解
restore / pack / publish / deploy run
命令、部署配置、CI/CD流水线模式
Activate and Manage讲解
deploy activate / status / uninstall
命令、环境管理
Scenarios Index介绍故障模式和边缘情况——手动编辑、共享资源、虚拟资源、名称冲突

Anti-patterns

反模式

  1. Hand-rolling REST calls for
    pack
    ,
    publish
    ,
    deploy run
    , or
    activate
    .
    The
    uip solution
    CLI handles auth, folder headers, pipeline semantics, and pagination correctly. Reach for REST only after confirming no command covers the task.
  2. Editing
    resources/solution_folder/
    directly.
    It is auto-generated and auto-cleaned. Manual edits desync from
    .uipx
    . Use
    uip solution projects add/remove
    instead.
  3. Skipping
    uip solution resources refresh
    before
    pack
    or
    upload
    .
    Ships stale bindings and debug-overwrite state.
  4. Running
    uip codedapp pack
    /
    publish
    /
    deploy
    on an AppV2 project that's already registered in
    .uipx
    .
    Once registered as
    Type: "AppV2"
    , the coded app is part of the solution —
    uip solution pack
    /
    uip solution publish
    /
    uip solution deploy run
    handle it. Direct
    uip codedapp publish
    bypasses the solution's deploy config (external client ID, routing name, action schema) and creates a duplicate registration. Use
    uip codedapp
    directly only for standalone coded apps scaffolded with
    npx create-vite
    (no
    .uipx
    in the tree, no
    project.uiproj
    /
    webAppManifest.json
    ).
  5. Creating a new
    .uipx
    per environment instead of using deploy configs.
    One packed solution promotes to dev/staging/prod via a per-environment
    --config-file
    (and
    uip login tenant set
    to target the tenant). Different
    .uipx
    files per environment defeats version tracking.
  6. Using
    uip solution upload
    (Studio Web) as a deployment path.
    Upload is for browser-based debugging only — it does not produce a published package and cannot be promoted via
    deploy run
    . Use
    pack
    publish
    deploy run
    for real deploys.
    upload
    also lands the solution in Studio Web's Cloud workspace tab — not the Local tab; SW's Local tab is a separate registration not addressable by
    uip solution
    .
  7. Trusting exit codes alone after a mutation. Always read the artefact (
    project.json
    ,
    .uipx
    , deploy status) — a non-zero exit may indicate partial state and a zero exit can mask warnings.
  1. pack
    publish
    deploy run
    activate
    手动编写REST调用。
    uip solution
    CLI可正确处理认证、文件夹头、流水线语义和分页。只有在确认没有对应的命令可完成任务时,才使用REST接口。
  2. **直接编辑
    resources/solution_folder/
    目录。**该目录是自动生成和清理的。手动编辑会导致与
    .uipx
    不同步。请使用
    uip solution projects add/remove
    替代。
  3. **在执行
    pack
    upload
    前跳过
    uip solution resources refresh
    步骤。**会导致部署过期的绑定和调试覆盖状态。
  4. **对已在
    .uipx
    中注册的AppV2项目执行
    uip codedapp pack
    /
    publish
    /
    deploy
    命令。**一旦注册为
    Type: "AppV2"
    ,编码应用就是解决方案的一部分——由
    uip solution pack
    /
    uip solution publish
    /
    uip solution deploy run
    处理。直接执行
    uip codedapp publish
    会绕过解决方案的部署配置(外部客户端ID、路由名称、操作 schema),并创建重复注册。仅对通过
    npx create-vite
    搭建的独立编码应用(目录树中无
    .uipx
    ,无
    project.uiproj
    /
    webAppManifest.json
    )直接使用
    uip codedapp
    命令。
  5. **为每个环境创建新的
    .uipx
    文件,而非使用部署配置。**一个打包后的解决方案可通过每个环境的
    --config-file
    (以及
    uip login tenant set
    切换目标租户)部署到开发/预发布/生产环境。为每个环境创建不同的
    .uipx
    文件会破坏版本追踪。
  6. uip solution upload
    (Studio Web)作为部署路径。Upload仅用于基于浏览器的调试——不会生成已发布的包,也无法通过
    deploy run
    升级。请使用
    pack
    publish
    deploy run
    进行正式部署。
    upload
    还会将解决方案上传到Studio Web的
    Cloud workspace
    标签页——而非Local标签页;SW的Local标签页是独立的注册项,无法通过
    uip solution
    访问。
  7. **仅依赖退出码判断变更结果。**务必读取工件(
    project.json
    .uipx
    、部署状态)——非零退出码可能表示部分状态异常,零退出码也可能掩盖警告信息。