- 概述
- 开始使用
- 概念
- 使用 UiPath CLI
- 操作指南
- CI/CD 方法
- 命令参考
- 迁移
- 参考与支持
Syntax and options for `uip solution projects`, which manages the projects listed in a `.uipx` solution manifest, plus cloud-project publish and sync.
uip solution projects manages the projects listed inside a .uipx solution manifest — RPA processes, tests, agents, Maestro flows, case and BPMN projects, coded apps, functions, API workflows, and other buildable project types. A library is not a project — publish it on its own, then attach it with uip solution resources add --source remote --kind Library.
This group was previously documented as project (singular). The singular form still works — it's kept registered as a hidden, deprecated alias for back-compat — but projects is canonical going forward.
add, import, remove, and list operate on local files only — no authentication required. publish and resync operate on a cloud solution project and require an active session.
大纲
uip solution projects add <project-path> [solutionFile]
uip solution projects import <source> [--solutionFile <path>]
uip solution projects remove <project-path> [solutionFile]
uip solution projects list [--solution-folder <path>]
uip solution projects publish --project-name <name> --package-name <name> --package-version <version> [--folder-name <name>] [--description <text>] [--release-notes <text>] [-t <tenant-name>]
uip solution projects resync [project-name] [--project-name <name>] [--sync-option <Sync|Reset>] [-t <tenant-name>]
uip solution projects add <project-path> [solutionFile]
uip solution projects import <source> [--solutionFile <path>]
uip solution projects remove <project-path> [solutionFile]
uip solution projects list [--solution-folder <path>]
uip solution projects publish --project-name <name> --package-name <name> --package-version <version> [--folder-name <name>] [--description <text>] [--release-notes <text>] [-t <tenant-name>]
uip solution projects resync [project-name] [--project-name <name>] [--sync-option <Sync|Reset>] [-t <tenant-name>]
Common behaviour (add / import / remove)
- The target project folder must contain a
project.uiproj, legacyproject.json, oruipath.jsondescriptor. The command auto-detects which one. - When
[solutionFile]is omitted, the command searches upward from the project path (or the current directory, forimport) for the nearest.uipx. If none is found, or if multiple.uipxfiles live in the same folder, the command fails and exits with1. - 系统会为添加到清单文件的每个项目条目生成唯一的
Id(UUID)。
添加
注册已驻留在解决方案目录中的项目文件夹。项目文件夹的相对路径记录在.uipx中,且系统会在解决方案的内部资源构建器中配置匹配的条目。
参数
<project-path>(required) — Path to the project folder. Must containproject.uiproj,project.json, oruipath.json.[solutionFile](可选) —.uipx解决方案清单文件的路径。如果省略,则通过从<project-path>向上遍历来找到最近的.uipx。
示例
uip solution projects add ./my-solution/my-project ./my-solution/my-solution.uipx
# Auto-detect the .uipx
uip solution projects add ./my-solution/my-project
uip solution projects add ./my-solution/my-project ./my-solution/my-solution.uipx
# Auto-detect the .uipx
uip solution projects add ./my-solution/my-project
数据形状(--输出 json)
{
"Code": "ProjectAdd",
"Data": {
"Status": "Added successfully",
"Project": "my-project/project.uiproj",
"Solution": "/workspace/my-solution/my-solution.uipx"
}
}
{
"Code": "ProjectAdd",
"Data": {
"Status": "Added successfully",
"Project": "my-project/project.uiproj",
"Solution": "/workspace/my-solution/my-solution.uipx"
}
}
故障模式
- 项目位于解决方案文件夹之外。该命令使用指向
projects import的指针拒绝添加,这会复制外部项目。 - Project is already registered. Exits with
1and a message naming the existing project path.
import
将外部项目文件夹复制到解决方案目录中(保留其文件夹名称),然后在.uipx中将其注册。当要包含的项目尚未在解决方案根目录下时,请使用此选项。
参数
<source>(required) — Path to the external project folder to import. Must be a directory containingproject.uiproj,project.json, oruipath.json. This is a positional argument, not a flag — earlier docs on this page showed it as--source <path>, which is wrong.
选项
| 长 | 值 | 默认 | 描述 |
|---|---|---|---|
--solutionFile | 路径 | nearest .uipx above the current directory | Path to the .uipx solution manifest. |
示例
uip solution projects import ./external-project \
--solutionFile ./my-solution/my-solution.uipx
# From inside the solution directory (auto-detect .uipx)
cd ./my-solution
uip solution projects import ../shared-library
uip solution projects import ./external-project \
--solutionFile ./my-solution/my-solution.uipx
# From inside the solution directory (auto-detect .uipx)
cd ./my-solution
uip solution projects import ../shared-library
数据形状(--输出 json)
{
"Code": "ProjectImport",
"Data": {
"Status": "Imported successfully",
"Project": "external-project/project.uiproj",
"Solution": "/workspace/my-solution/my-solution.uipx"
}
}
{
"Code": "ProjectImport",
"Data": {
"Status": "Imported successfully",
"Project": "external-project/project.uiproj",
"Solution": "/workspace/my-solution/my-solution.uipx"
}
}
故障模式和回滚
- 目标文件夹已存在。命令拒绝覆盖;请先重命名源文件夹或删除现有目标。
- 项目已在
.uipx清单中存储。在复制任何文件之前拒绝。 - 复制、写入或构建器步骤失败。命令回滚 — 复制的目录将被删除,并且
.uipx将还原为其原始内容。
remove
Unregister a project from the .uipx solution manifest and remove its entry from the internal resource builder. Files on disk are not deleted. Refuses to remove the last project in a solution (an empty Projects[] is only valid immediately after init) — the one exception is a project of an unsupported type, which can always be removed to unblock pack.
参数
<project-path>(必填) — 要删除的项目文件夹的路径。当前必须在.uipx中注册。[solutionFile](可选) —.uipx解决方案清单文件的路径。默认为从<project-path>向上遍历找到的最近的.uipx。
示例
uip solution projects remove ./my-solution/my-project ./my-solution/my-solution.uipx
uip solution projects remove ./my-solution/my-project ./my-solution/my-solution.uipx
数据形状(--输出 json)
{
"Code": "ProjectRemove",
"Data": {
"Status": "Removed successfully",
"Project": "my-project",
"Solution": "/workspace/my-solution/my-solution.uipx"
}
}
{
"Code": "ProjectRemove",
"Data": {
"Status": "Removed successfully",
"Project": "my-project",
"Solution": "/workspace/my-solution/my-solution.uipx"
}
}
故障模式
- 项目位于解决方案文件夹之外。相对路径不得以
..开头。 - 项目不在清单中。以
1退出并将相对路径用于搜索。 - Project is the only one left in the solution. Refused unless it's of an unsupported project type.
列表
List the projects registered in the local .uipx solution manifest. Reads only on-disk metadata — no backend call.
选项
| 长 | 值 | 默认 | 描述 |
|---|---|---|---|
--solution-folder | 路径 | 当前目录 | Path to the solution root folder. |
示例
uip solution projects list
uip solution projects list
数据形状(--输出 json)
{
"Code": "SolutionProjectsList",
"Data": [
{
"Name": "MyProject",
"Type": "Process",
"Id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
"ProjectRelativePath": "MyProject/project.uiproj",
"ProjectFilePath": "/workspace/my-solution/MyProject/project.uiproj"
}
]
}
{
"Code": "SolutionProjectsList",
"Data": [
{
"Name": "MyProject",
"Type": "Process",
"Id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
"ProjectRelativePath": "MyProject/project.uiproj",
"ProjectFilePath": "/workspace/my-solution/MyProject/project.uiproj"
}
]
}
发布
Publish a cloud solution project (one already living in Automation Cloud, not a local .uipx project) as a solution package, and wait for the publish operation to complete.
选项
| 长 | 值 | 默认 | 描述 |
|---|---|---|---|
--project-name | text | — | Required. Cloud solution project name to publish. |
--package-name | text | — | Required. Solution package name to create. |
--package-version | text | — | Required. Solution package version to create. |
--folder-name | text | — | Root folder name to store in the solution package. |
--description | text | — | Solution package description. |
--release-notes | text | — | Solution package release notes. |
-t, --tenant | name | 会话默认值 | Tenant. |
--timeout | 秒 | 360 | Publish-polling timeout. |
--poll-interval | ms | 5000 | Milliseconds between publish status polls. |
--login-validity | 分钟 | 10 | Minimum minutes before token expiration to trigger a refresh. |
示例
uip solution projects publish --project-name MyProject \
--package-name my-package --package-version 1.0.0 \
--folder-name MySolution
uip solution projects publish --project-name MyProject \
--package-name my-package --package-version 1.0.0 \
--folder-name MySolution
数据形状(--输出 json)
{
"Code": "SolutionProjectPublish",
"Data": {
"ProjectName": "MyProject",
"PackageName": "my-package",
"PackageVersion": "1.0.0",
"Status": "Completed"
}
}
{
"Code": "SolutionProjectPublish",
"Data": {
"ProjectName": "MyProject",
"PackageName": "my-package",
"PackageVersion": "1.0.0",
"Status": "Completed"
}
}
resync
Sync or reset a cloud solution project, and wait for the operation to complete. Sync reconciles the project with its source; Reset discards local cloud changes.
参数
[project-name](optional) — Cloud solution project name to sync. Can also be provided with--project-name; providing both with different values is an error.
选项
| 长 | 值 | 默认 | 描述 |
|---|---|---|---|
--project-name | text | — | Cloud solution project name to sync (alternative to the positional argument). |
--sync-option | Sync | Reset | Sync | Which sync operation to run. |
-t, --tenant | name | 会话默认值 | Tenant. |
--timeout | 秒 | 360 | Sync-polling timeout. |
--poll-interval | ms | 5000 | Milliseconds between sync status polls. |
--login-validity | 分钟 | 10 | Minimum minutes before token expiration to trigger a refresh. |
示例
uip solution projects resync --project-name MyProject --sync-option Sync
# Positional form, reset instead of sync
uip solution projects resync MyProject --sync-option Reset
uip solution projects resync --project-name MyProject --sync-option Sync
# Positional form, reset instead of sync
uip solution projects resync MyProject --sync-option Reset
数据形状(--输出 json)
{
"Code": "SolutionProjectResync",
"Data": {
"ProjectName": "MyProject",
"Status": "Successful",
"SyncOption": "Sync",
"SyncErrors": []
}
}
{
"Code": "SolutionProjectResync",
"Data": {
"ProjectName": "MyProject",
"Status": "Successful",
"SyncOption": "Sync",
"SyncErrors": []
}
}
On failure, Instructions lists each sync error by service name and affected resource keys.
相关命令
uip solution init— 在添加项目之前构建解决方案。uip solution resources refresh— 编辑项目绑定后重新同步资源。uip solution pack— 在项目列表最终确定后打包解决方案。
另请参阅
- 您的第一个管道— 端到端示例。
uip solution概述。