Hi
Sorry for my late reply!
Thank you very much for your replies!
Dustin, I actually learned a lot from your posting. I'm new to
PowerShell and I had never heard of Trace-Command. Very valuable.
I guess I will rely on positional parameters then. It's not as
readable, but I need to have a lot of different tasks run on different
environments, so I'd like to have a central runner script (it will
host a more than the original psake.ps1 file).
Thank you again!
// Asger Hallas
> For more information seehttp://jameskovacs.com/2010/03/21/pow-biff-wham-splat/.
On 18 Apr., 18:55, Dustin Venegas <dustin.vene...@gmail.com> wrote:
> It looks like this may be an issue with how you're passing variables and the
> "splat" operator. The short solution to use only positional parameters. For
> example:
> .\psake.ps1 default.ps1 "build-all" 3.5x86
>
> You could also use a hashtable to name every parameter or make another
> script that imports/removes the psake.psm1 and executes invoke-psake for
> your projects. I typically make my own script.
>
>
> *Long Version*
>
> I haven't used the splat (@) operator in powershell before. I executed a
> trace-command on parameter bindings and noticed "-framework" is being bound
> to the framework parameter while "3.5x86" binds to docs.
>
> I'm not even getting clear binding information when I run a trace command on
> .\psake.ps1
> {buildfile="default.ps1";tasklist="build-all";framework="3.5x86"}
>
> PS C:\dev242\foo> trace-command -name parameterbinding {.\psake.ps1
> default.ps1 "build-all" -framework 3.5x86} -PSHost
>
> ( Information truncated for brevity. There is a *lot* of info that
> trace-command outputs).
> DEBUG: ParameterBinding Information: 0 : BIND arg [-framework] to
> parameter [framework]
> DEBUG: ParameterBinding Information: 0 : BIND arg [3.5x86] to parameter
> [docs]
>
>
>
>
>
> On Sat, Apr 17, 2010 at 12:19 PM, Jason Jarrett <sta...@gmail.com> wrote:> > If you downloadhttp://github.com/staxmanade/StatLight
> > I just repro'd in my open source project - but don't have time to check
> > into it,,,
>
>> > On Sat, Apr 17, 2010 at 9:56 AM, Dustin Venegas <dustin.vene...@gmail.com>wrote:
> > and run the following command
>
> > .\psake.ps1 .\default.ps1 build-all -framework 3.5x86
>
> > I got
>
> > Invoke-psake : Cannot process argument transformation on parameter 'docs'.
> > Cannot convert value "System.String" to type
> > "System.Management.Automation.SwitchParameter", parameters of this type
> > only accept booleans or numbers, use $true, $f
> > alse, 1 or 0 instead.
> > At C:\Code\StatLight.Git\psake.ps1:4 char:13
> > + invoke-psake <<<< @args
> > + CategoryInfo : InvalidData: (:) [Invoke-psake],
> > ParameterBindin...mationException
> > + FullyQualifiedErrorId :
> > ParameterArgumentTransformationError,Invoke-psake
>
>> >> On Fri, Apr 16, 2010 at 9:22 AM, Asger Hallas <asgerhal...@gmail.com>wrote:
> >> I don't see anything suspicious off the bat. Could you paste your
> >> buildtasks.ps1 into pastebin (http://pastebin.com/) and send us a link?
>
> >> Thanks,
> >> -dv
>
> >>> psake-users...@googlegroups.com<psake-users%2Bunsubscribe@googlegr oups.com>>
> >>> Hi again
>
> >>> Another problem for me using psake 4.0 :)
>
> >>> When I write the following:
>
> >>> .\psake.ps1 .\buildtasks.ps1 deploy -framework 3.5x86
>
> >>> I get this error:
>
> >>> Invoke-psake : Cannot process argument transformation on parameter
> >>> 'docs'. Cannot convert value "System.String" to type
> >>> "System.Management.Automation.SwitchParameter", parameters of this
> >>> type only accept booleans or numbers, use $true, $f
> >>> alse, 1 or 0 instead.
> >>> At C:\workspace\KSLog\master\psake.ps1:4 char:14
> >>> + invoke-psake <<<< @args
> >>> + CategoryInfo : InvalidData: (:) [Invoke-psake],
> >>> ParentContainsErrorRecordException
> >>> + FullyQualifiedErrorId :
> >>> ParameterArgumentTransformationError,Invoke-psake
>
> >>> I have tried all possible combinations of argument order. But I can't
> >>> figure out what goes wrong.
> >>> Is this a known issue?
>
> >>> Kind regards
> >>> Asger
>
> >>> --
> >>> You received this message because you are subscribed to the Google Groups
> >>> "psake-users" group.
> >>> To post to this group, send email to psake...@googlegroups.com.
> >>> To unsubscribe from this group, send email to
> >>> .> >> Dustin.Vene...@gmail.com
> >>> For more options, visit this group at
> >>>http://groups.google.com/group/psake-users?hl=en.
>
> >> --
> >> Dustin Eric Venegas
>> >> psake-users...@googlegroups.com<psake-users%2Bunsubscribe@googlegr oups.com>
> >> --
> >> You received this message because you are subscribed to the Google Groups
> >> "psake-users" group.
> >> To post to this group, send email to psake...@googlegroups.com.
> >> To unsubscribe from this group, send email to
> >> .> > psake-users...@googlegroups.com<psake-users%2Bunsubscribe@googlegr oups.com>
> >> For more options, visit this group at
> >>http://groups.google.com/group/psake-users?hl=en.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "psake-users" group.
> > To post to this group, send email to psake...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > .> Dustin.Vene...@gmail.com
> > For more options, visit this group at
> >http://groups.google.com/group/psake-users?hl=en.
>
> --
> Dustin Eric Venegas
>> For more options, visit this group athttp://groups.google.com/group/psake-users?hl=en.
> --
> You received this message because you are subscribed to the Google Groups "psake-users" group.
> To post to this group, send email to psake...@googlegroups.com.
> To unsubscribe from this group, send email to psake-users...@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "psake-users" group.
To post to this group, send email to psake...@googlegroups.com.
To unsubscribe from this group, send email to psake-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/psake-users?hl=en.