uipath-cli
latest
false
UiPath CLI 用户指南
- 概述
- 开始使用
- 概念
- 使用 UiPath CLI
- 操作指南
- CI/CD 方法
- 命令参考
- 迁移
- 参考与支持
重要 :
请注意,此内容已使用机器翻译进行了本地化。
新发布内容的本地化可能需要 1-2 周的时间才能完成。
Syntax and options for `uip solution cleanup`, which removes unused items from every project in a UiPath solution.
uip solution cleanup removes unused items (activities, dependencies) from every project in a solution. For a solution directory, project sources are modified in place; pass --dry-run to only detect unused items without changing anything.
大纲
uip solution cleanup <solutionPath> [--dry-run] [--skip-imports] [--nuget-sources-config-path <path>] [--exclude-configured-sources] [--feed-folder <name>] [--login-validity <minutes>]
uip solution cleanup <solutionPath> [--dry-run] [--skip-imports] [--nuget-sources-config-path <path>] [--exclude-configured-sources] [--feed-folder <name>] [--login-validity <minutes>]
参数
| 名称 | 必填 | 用途 |
|---|---|---|
<solutionPath> | 是 | Path to a solution directory (containing .uipx) or a .uis file. |
选项
| 长 | 值 | 默认 | 描述 |
|---|---|---|---|
--dry-run | 标记 | 关闭 | Detect unused items but don't modify any project files. |
--skip-imports | 标记 | 关闭 | Don't clean up now-unused references to removed items in the project's files. |
--nuget-sources-config-path | 路径 | — | NuGet 源配置文件的路径。 |
--exclude-configured-sources | 标记 | 关闭 | Resolve project dependencies only from tenant feeds and --nuget-sources-config-path. Drops the built-in UiPath and nuget.org feeds — a dependency not on those feeds fails to restore. |
--feed-folder | name or path | — | Resolve project dependencies from this Orchestrator folder's library feed instead of every tenant feed. |
--login-validity | 分钟 | 10 | Minimum minutes before token expiration to trigger a refresh. |
示例
# Remove unused items from every project, modifying files in place
uip solution cleanup ./my-solution
# Detect without modifying anything
uip solution cleanup ./my-solution --dry-run
# Remove unused items from every project, modifying files in place
uip solution cleanup ./my-solution
# Detect without modifying anything
uip solution cleanup ./my-solution --dry-run
数据形状(--输出 json)
{
"Code": "SolutionCleanup",
"Data": {
"DryRun": false,
"ChangedFilesByProject": {
"project-design-id": ["project.json", "Main.xaml"]
},
"CleanupByProject": {
"project-design-id": {
"unusedItems": ["UiPath.Stale.Activities"],
"cleanedFiles": ["Main.xaml"]
}
}
}
}
{
"Code": "SolutionCleanup",
"Data": {
"DryRun": false,
"ChangedFilesByProject": {
"project-design-id": ["project.json", "Main.xaml"]
},
"CleanupByProject": {
"project-design-id": {
"unusedItems": ["UiPath.Stale.Activities"],
"cleanedFiles": ["Main.xaml"]
}
}
}
}
With --dry-run, ChangedFilesByProject is empty and each project's cleanedFiles stays empty, since nothing was written.
退出代码
请参阅共享合同的退出代码。
相关命令
uip solution restore— resolve NuGet dependencies (run beforepack, not related to cleanup).uip solution pack— package the solution after cleaning it up.