psake is a domain specific language to create builds using a dependency pattern just like Ant, NAnt, Rake or MSBuild.

You create a build script using PowerShell that consists of Tasks which are simply function calls. Each Task function can define dependencies on other Task functions.

In the example script below, Task Compile depends on Tasks Clean and Init, which means that before Task Compile can execute, both tasks Clean and Init have to execute. psake ensures that this is done.

Task Compile -Depends Init,Clean {

Task Clean -Depends Init {

Task Init {

psake reads in your build script and executes the Task functions that are defined within it and enforces the dependencies between tasks. The great thing about psake is that it is written in PowerShell and that means you have the power of .NET and all the features of PowerShell at your disposal within your build script. Not to mention that you don't have to pay the XML bracket tax anymore.