"The system cannot find the file specified" 在自定义工具上

"The system cannot find the file specified" on custom tool

我使用 powershell 脚本为 MRM 创建了一个自定义工具,我已经测试过它可以在我的本地机器上运行。

脚本已作为资源添加到工具中,我通过以下命令 -command ./KeepBuild-RM.ps1 加上参数调用脚本。

我已经添加了基于此工具的操作(本质上是对工具的传递)作为发布路径中的第一个操作。

发行版运行时似乎立即失败并显示 "The system cannot find the file specified"。

在检查服务器上的临时位置时,该工具似乎并未作为放置的一部分进行复制。

有谁知道可能导致复制失败的原因吗?

命令 字段应为powershell.exe参数 字段应为 -command ./KeepBuild-RM.ps1

如果您真的在命令字段中输入 -command ./KeepBuild-RM.ps1,它会尝试 运行 与命令行中的文本完全一致。