powershell - 在安装在 Mac 上的 VSTS 代理中运行 powershell 构建步骤?

标签 powershell xamarin build xamarin.ios azure-devops

我在 mac 上安装了 VSTS 构建代理来构建 xamarin iOS 项目。构建工作正常,直到我添加了 powershell 构建步骤。
即使我为 mac ( https://github.com/PowerShell/PowerShell ) 安装了 powershell 并重新安装了代理,VSTS 仍提示它没有能够运行构建的代理。

No agent could be found with the following capabilities: DotNetFramework, Xamarin.iOS, npm



当我禁用构建步骤时,构建工作得很好。

是否可以在 Mac 上运行 powershell 构建步骤?

最佳答案

正如 MrHinsh 澄清的那样,PowerShell 任务不能在 Mac 上使用。

作为一种解决方法,我使用了 ShellScript 任务:

ShellScript task

使用以下 bash 脚本:

#!/bin/bash
powershell ./SetAppVersion.ps1

此外,powershell 安装程序似乎没有将 powershell 添加到我的 PATH 中,所以我不得不添加它:
$ export PATH=$PATH:/usr/local/microsoft/powershell/6.0.0-alpha.16

关于powershell - 在安装在 Mac 上的 VSTS 代理中运行 powershell 构建步骤?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42419098/

相关文章:

powershell - 如何在 Ubuntu 18.04 上将 Powershell Core 更新到最新版本

Powershell 选择 HTML 文本

Xamarin Forms 将不同字体大小的标签垂直对齐到同一基线

xamarin 表单与 mvvmcross 一起使用

c++ - 如何让我的过时代码在运行前自动构建?

android - compileSdkVersion、minSdkVersion、targetSdkVersion应该怎么设置?

powershell - 如何使用 PowerShell 取得文件所有权?

powershell - 如何在 PowerShell 中按列排序?

android - 无法在 Visual Studio 2015 中访问 Android SDK 管理器

reactjs - 如何修复使用 create-react-app 构建后的白屏?