Skip to content

How can I access functions that are in other script files from within psake?

dlidstrom edited this page Feb 16, 2011 · 3 revisions

Use the include function to access functions that are in another script file.

The following is an example:

Include ".\build_utils.ps1"

Task default -depends Test

Task Test -depends Compile, Clean {
}

Task Compile -depends Clean {
}

Task Clean {
}

You can have more than 1 include file in your script if you need to include multiple script files.

Next – How can I force the build to fail if a command-line program I run from a task fails?

Clone this wiki locally