Dependencies

To add a dependency on another task, use the IsDependentOn-method.

Task("A")
    .Does(() =>
{
});

Task("B")
    .IsDependentOn("A")
    .Does(() =>
{
});

RunTarget("B");

This will first execute target A and then B as expected.