我已经使用 Chocolatey 安装了 psake。psake
这允许您使用来自 powershell 或 windows 命令行的命令运行 psake 。
但是,当我尝试使用以下命令将属性传递给 psake 时
psake TestProperties -properties @{"tags"="test"}
我收到以下错误:
PS D:\projects\WebTestAutomation> psake TestProperties -properties @{"tags"="test"}
"& 'C:\Chocolatey\lib\psake.4.2.0.1\tools\\psake.ps1' TestProperties -properties System.Collections.Hashtable
C:\Chocolatey\lib\psake.4.2.0.1\tools\psake.ps1 : Cannot process argument transformation on parameter 'properties'. Cannot convert the "System.Collections.Hashtable" value of
type "System.String" to type "System.Collections.Hashtable".
At line:1 char:80
+ & 'C:\Chocolatey\lib\psake.4.2.0.1\tools\\psake.ps1' TestProperties -properties <<<< System.Collections.Hashtable; if ($psake.build_success -eq $false) { exit 1 } else { e
xit 0 }
+ CategoryInfo : InvalidData: (:) [psake.ps1], ParameterBindin...mationException
+ FullyQualifiedErrorId : ParameterArgumentTransformationError,psake.ps1
关于如何克服这个问题的任何想法?