Az 版本 null 在代理上本地不可用。 Validate-VersionParameters:无法将值“null”转换为类型“System.Version”

问题描述 投票:0回答:1

尝试在 Azure devops 中运行 AzurePowerShell@5 任务时遇到问题

Az version null not avaiable locally on the agent. Downloading dynamically.
Validate-VersionParameters: Cannot convert value 'null' to type 'System.Version'
Exception: /home/vsts/work/_tasks/AzurePowerShell_72a1931b-effb-4d2e-8fd8-f8472a07cb62/5.218.0/Utility.ps1:94
Line |
94 |  …             throw ("Could not find the module path with given version …
 |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 | Could not find the module path with given version.
 [![enter image description here][1]][1]

azure-devops azure-powershell
1个回答
0
投票

此任务需要参数 azurePowerShellVersion。提供值“最新”或“其他”。

针对此问题提出了一个 github 问题。 https://github.com/MicrosoftDocs/azure-devops-docs/issues/11928.

突出显示的参数是必需的。 https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/reference/azure-powershell-v5?view=azure-pipelines

© www.soinside.com 2019 - 2024. All rights reserved.