problem running tasks

11 views
Skip to first unread message

stuartg

unread,
Oct 19, 2009, 4:40:17 AM10/19/09
to psake-users
Hi,

Apologies if this is somewhat of a 'noobish' question, but, I've
started to write a build script based on http://ayende.com/Blog/archive/2009/08/30/on-psake.aspx,
and I just can't get it to run. I'm using powershell 2.0 and psake
2.01.

PS E:\myproect> invoke-psake .\build.ps1 -taskList Clean
Executing task, Clean...
build.ps1:Cannot bind argument to parameter 'Path' because it is null.

properties {
$base_dir = Resolve-Path .
$lib_dir = "$base_dir\lib"
$build_dir = "$base_dir\build"
$sln_file = "$base_dir\MySolution.sln"
$version = "1.0.0.0"
$debug_dir = "$base_dir\bin\Debug
$release_dir = $base_dir\bin\Release";
}

Task Clean {
remove-item -force -recurse $build_dir -ErrorAction SilentlyContinue
remove-item -force -recurse $debug_dir -ErrorAction SilentlyContinue
remove-item -force -recurse $release_dir -ErrorAction
SilentlyContinue
}

Any ideas?

Shaun Becker

unread,
Oct 19, 2009, 8:22:38 AM10/19/09
to psake...@googlegroups.com
You are missing a quote at the end of $debug_dir and at the beginning of $release_dir. It should be:

$debug_dir = "$base_dir\bin\Debug"
$release_dir = "$base_dir\bin\Release";

stuartg

unread,
Oct 19, 2009, 8:49:56 AM10/19/09
to psake-users
Ah, well that does really make me look like a gigantic idiot, never
mind noob.

Thanks!

On Oct 19, 1:22 pm, Shaun Becker <smbec...@gmail.com> wrote:
> You are missing a quote at the end of $debug_dir and at the beginning of
> $release_dir. It should be:
> $debug_dir = "$base_dir\bin\Debug*"*
> $release_dir = *"*$base_dir\bin\Release";
Reply all
Reply to author
Forward
0 new messages