The honey flavoured psake task automation tool
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


The honey flavoured psake task automation tool

Build status Gitter

Installing Koshu

Open up a command line and enter the following command:

powershell -noprofile -executionpolicy unrestricted -command "iex ((new-object net.webclient).DownloadString(''))"

This will create a file called koshu.ps1 in the current directory. This file enables you to invoke tasks as well as do scaffolding of task files and plugins.

Note nuget must be in your path or located in a subdirectory of the current directory.

Initializing Koshu

In powershell, enter the path to the koshu.ps1 file and invoke it with the switch -load.

<directoryPath>\koshu.ps1 -load

Scaffolding a taskfile

Scaffolding a taskfile is as easy as calling Koshu-Scaffold passing a single parameter (-template)

Koshu-Scaffold -template <templateName>

There are currently 2 templates to choose from. build and empty.

Running Koshu


.\koshu [<tasks>] [<taskFile>]

Powershell examples

.\koshu compile
.\koshu -taskfile build.ps1
.\koshu compile build.ps1

Command line

powershell .\koshu [<tasks>] [<taskFile>]

Command line examples

powershell .\koshu
powershell .\koshu compile
powershell .\koshu -taskfile build.ps1
powershell .\koshu compile build.ps1


powershell ./koshu [<tasks>] [<taskFile>]

Bash examples

powershell ./koshu
powershell ./koshu compile
powershell ./koshu -taskfile build.ps1
powershell ./koshu compile build.ps1

Using koshu.cmd or .cmd

From explorer

Simply double click .cmd to run

From command line

koshu compile
koshu compile build.ps1


Koshu can easily be extended through plugin packages. Plugin packages is simply a neat way for you to package up reusable powershell scripts and modules.

A plugin is usually a nuget package containing a powershell module that you want to import and use when running tasks. Packages can also be defined as git repositories or directories on a file share. You can read more on how to create a plugin here:

Using plugin packages

Simply add a packages section at the top of your task file and specify the plugins you want to use.

packages @{

Some plugin packages supports the Koshu configuration model. It will give you a chance to change default values before running tasks.

config @{

Have a look at the plugins homepage to find out what configuration options that are available.

NuGet package plugins

packages @{
	# Unspecified version

    # Specific version

Git repository plugins

packages @{


Directory plugins

packages @{
	"PluginName"="dir+C:\SomeDirectory" # Looks for a plugin at C:\SomeDirectory\PluginName

Plugins on Nuget

Pack task

Before you can call pack_solution you need to make sure that the project (csproj) file you want to pack has imported the Microsoft.WebApplication.targets file. Next you add a Publish task that depends on PipelinePreDeployCopyAllFilesToOneFolder.

<Target Name="Publish" DependsOnTargets="PipelinePreDeployCopyAllFilesToOneFolder" />