How to use nuget package

74 views
Skip to first unread message

Jonathan Curtis

unread,
Apr 5, 2012, 10:51:02 AM4/5/12
to psake-users
Hi,

I'm new to powershell and psake. I've downloaded the nuget package,
but can't find any information on how to use it properly. What is the
normal way to use it? Should I create a helper script in the root of
my solution? What should that look like?

Thanks,
Jon

Frank Schwieterman

unread,
Apr 5, 2012, 8:21:37 PM4/5/12
to psake...@googlegroups.com
  I've ended up having a file like the below in my solution root:
  I keep a set of config files which are values for the psake parameters.  So to run a task, I type:

.\run.ps1 <pathToConfigFile> [tasksToRun]

run.ps1:
param($configurationFile = $(throw "Missing first parameter, which should be your config file."), $task = "default")

get-module psake | remove-module

import-module .\packages\psake.4.0.1.0\tools\psake.psm1

$conf = & $configurationFile

invoke-psake .\PsakeTasks.ps1 $task -parameters $conf


--
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.


Jonathan Curtis

unread,
Apr 11, 2012, 5:01:18 AM4/11/12
to psake-users
Thanks, maybe it would be good if the package created a file such as
this for you. Possibly a sample build script too.

On Apr 6, 1:21 am, Frank Schwieterman <fschw...@gmail.com> wrote:
>   I've ended up having a file like the below in my solution root:
>   I keep a set of config files which are values for the psake parameters.
> So to run a task, I type:
>
> .\run.ps1 <pathToConfigFile> [tasksToRun]
>
> run.ps1:
> param($configurationFile = $(throw "Missing first parameter, which should
> be your config file."), $task = "default")
>
> get-module psake | remove-module
>
> import-module .\packages\psake.4.0.1.0\tools\psake.psm1
>
> $conf = & $configurationFile
>
> invoke-psake .\PsakeTasks.ps1 $task -parameters $conf
>
Reply all
Reply to author
Forward
0 new messages