简体   繁体   English

自托管 MacOS 代理上的 DevOps 管道在 NuGet package 恢复但适用于 Azure 管道上失败

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

I faced a problem with running a DevOps pipeline on self-hosted MacOS (Catalina) build agent and it fails on the step NuGet Package Restore.我在自托管 MacOS (Catalina) 构建代理上运行 DevOps 管道时遇到问题,它在步骤 NuGet Package 恢复时失败。 The same step is successful when run on Azure Pipeline agent.在 Azure 管道代理上运行相同的步骤是成功的。

The error is:错误是:

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.请验证文件路径是否存在,或者该文件是否可以在 PATH 环境变量指定的目录中找到。 Also check the file mode to verify the file is executable.还要检查文件模式以验证文件是否可执行。

Microsoft has configure the mono in the hosted agent , so you can run the pipeline successfully via hosted agent. Microsoft 已在托管代理中配置了 mono ,因此您可以通过托管代理成功运行管道。 Self-hosted agent need configure it and then you can run the pipeline successfully.自托管代理需要配置它,然后您才能成功运行管道。

Configure mono配置mono

  1. Install mono on the local machine which has installed the self-hosted agent在已安装自托管代理的本地机器上 安装 mono
  2. After the installation completed successfully, run the sample to verify Mono is working correctly.安装成功完成后,运行 示例以验证 Mono 是否正常工作。
  3. Configure the environment variable of mono on the local machine.在本地机器上配置mono的环境变量。

I posted my question to Microsoft Developer Community and managed to figure out what was the problem.我将我的问题发布到 Microsoft 开发人员社区并设法找出问题所在。 You can follow this link .您可以点击此链接 I hope I do not break any rules by redirecting to another web-site.我希望我不会因为重定向到另一个网站而违反任何规则。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在自托管 Windows 代理上从 Azure DevOps 管道运行 Azure CLI 任务? - How to run Azure CLI tasks from an Azure DevOps Pipeline on a Self-Hosted Windows Agent? 自托管 Azure DevOps 管道代理失败并出现错误令牌受众无效 - Self Hosted Azure DevOps Pipeline Agent fails with error Token Audience is not valid 如何在自托管的 Windows 代理中安装 Liquibase? (Azure Devops 管道) - How to install Liquibase in a self hosted Windows agent ? (Azure Devops Pipeline) Azure 用于 Java 项目的 DevOps 管道,带有自托管代理 - Azure DevOps Pipeline for Java Project with self hosted agent “创建管道时出错。” 在 Azure 管道自托管代理中运行 powershell 脚本时 - "An error occurred while creating the pipeline." when running powershell script in Azure pipeline self-hosted agent Azure Devops macOS 管道在托管时因缺少配置文件而失败 - Azure Devops macOS Pipeline fails on hosted with missing provisioning profile 使用自托管代理的 DevOps 中的 Bud Pipeline 问题 - Issue with Buld Pipeline in DevOps with Self Hosted Agent Telerik Nuget package 在 Azure 中恢复构建管道失败 - Telerik Nuget package restore in Azure build pipeline fails Azure Devops 管道,知道管道何时完成的方法,使用自托管代理 - Azure Devops pipeline , way to know when pipeline is done , using self hosted agent 托管代理失败的 Azure DevOps 构建管道 - Azure DevOps build pipeline with hosted agent failing
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM