自托管 MacOS 代理上的 DevOps 管道在 NuGet 包还原时失败,但可在 Azure 管道上运行

DevOps pipeline on self-hosted MacOS agent fails on NuGet package restore but works on Azure Pipeline

我在自托管 MacOS (Catalina) 构建代理上 运行 设置 DevOps 管道时遇到问题,它在 NuGet 包还原步骤中失败。在 Azure Pipeline 代理上 运行 时同样的步骤成功。

错误是:

Unable to locate executable file: 'mono'. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.

Microsoft 有 configure the mono in the hosted agent,因此您可以 运行 通过托管代理成功管道。 Self-hosted代理需要配置它然后你就可以运行管道成功。

配置单声道

  1. Install mono 在安装了 self-hosted 代理的本地机器上
  2. 安装成功完成后,运行 sample 验证 Mono 是否正常工作。
  3. 在本机配置mono的环境变量

我将我的问题发布到 Microsoft 开发人员社区并设法找出问题所在。你可以关注这个link。我希望我不会通过重定向到另一个 web-site.

来违反任何规则