overriding properties on command line doesnt work

181 views
Skip to first unread message

Mike Duran

unread,
Mar 12, 2013, 12:06:13 PM3/12/13
to psake...@googlegroups.com
When I try to run psake with the -properties argument I get the following error:

PS C:\temp> psake .\testbuild.ps1 default -properties @{"environment"="trunk"}

C:\Chocolatey\lib\psake.4.2.0.1\tools\psake.ps1 : Cannot process argument transformation on parameter 'properties'. Can
not convert the "System.Collections.Hashtable" value of type "System.String" to type "System.Collections.Hashtable".
At line:1 char:89
+ & 'C:\Chocolatey\lib\psake.4.2.0.1\tools\\psake.ps1' .\testbuild.ps1 default -properties <<<<  System.Collections.Has
htable; if ($psake.build_success -eq $false) { exit 1 } else { exit 0 }
    + CategoryInfo          : InvalidData: (:) [psake.ps1], ParameterBindin...mationException
    + FullyQualifiedErrorId : ParameterArgumentTransformationError,psake.ps1

------------------------------------------------------ testbuild.ps1 ------------------------------------------------------
properties {
$environment = "trunk"
}

task default -depends init


task init{

write-host $environment
}


Damian Hickey

unread,
Apr 10, 2013, 7:28:54 AM4/10/13
to psake...@googlegroups.com
Does

psake .\testbuild.ps1 default -properties @{environment="trunk"}

work?
Reply all
Reply to author
Forward
0 new messages