【发布时间】:2021-02-11 11:48:37
【问题描述】:
我尝试在 Azure DevOps 中运行 dotnet tool install 并测试该工具。
本地
dotnet tool install dotnetsay -g
dotnetsay test
无缝运行。
在 Azure DevOps 中,此脚本:
- task: CmdLine@2
displayName: 'Install dotnetsay'
inputs:
script: 'dotnet tool install dotnetsay -g'
- task: CmdLine@2
displayName: 'Run dotnetsay'
inputs:
script: 'dotnetsay test'
返回错误
/home/vsts/work/_temp/8a35f36d-4eff-4541-9aae-cf3f063f9180.sh: line 1: dotnetsay: command not found
##[error]Bash exited with code '127'.
我已经尝试了 3 种不同的工具:
结果相同。
是否有任何其他命令可以使 dotnet 工具可用于 Azure DevOps?
【问题讨论】:
-
dotnetsay 是一个 dotnet 工具,它写入控制台传递的参数:github.com/dotnet/core/tree/master/samples/dotnetsay 但这个问题适用于我已经尝试过的任何 dotnet 工具。
标签: .net azure azure-devops