Reference

This reference guide describes the various methods and properties which make up the Cake build language, or DSL. If you're looking for other kind of information, check out the API reference or the documentation.

The DSL is made up of script aliases, that offers specific functionality within the context of a Cake build script. A script alias is an extension method for ICakeContext.

Built-in
Arguments Contains functionality related to arguments.
Assembly Info Contains functionality related to assembly info.
Build System Contains functionality related to build systems.
Cake Contains functionality related to running Cake scripts out of process.
Chocolatey

Contains functionality for working with Chocolatey.

In order to use the commands for this alias, Chocolatey will require to be installed on the machine where the build script is being run. See this page for details on how Chocolatey can be installed.

Directory Operations Contains extension methods for working with directories.
DNU Contains functionality for working with the DNU Utility.

These aliases have been marked as Obsolete. Use the DotNetCoreAliases instead.

DotCover

Contains functionality related to DotCover.

In order to use the commands for this alias, include the following in your build.cake file to download and install from NuGet.org, or specify the ToolPath within the appropriate settings class:

#tool "nuget:?package=JetBrains.dotCover.CommandLineTools"

DotNetBuild Contains functionality to run either MSBuild on Windows or XBuild on Mac/Linux/Unix.
DotNetCore

Contains functionality related to .NET Core CLI.

In order to use the commands for this alias, the .Net Core CLI tools will need to be installed on the machine where the Cake script is being executed. See this page for information on how to install.

Environment Contains functionality related to the environment.
File Operations Contains functionality related to file operations.
Fixie

Contains functionality related to running Fixie tests.

In order to use the commands for this alias, include the following in your build.cake file to download and install from NuGet.org, or specify the ToolPath within the FixieSettings class:

#tool "nuget:?package=Fixie"

GitReleaseManager

Contains functionality related to GitReleaseManager.

In order to use the commands for this alias, include the following in your build.cake file to download and install from NuGet.org, or specify the ToolPath within the appropriate settings class:

#tool "nuget:?package=gitreleasemanager"

GitReleaseNotes

Contains functionality related to GitReleaseNotes.

In order to use the commands for this alias, include the following in your build.cake file to download and install from NuGet.org, or specify the ToolPath within the GitReleaseNotesSettings class:

#tool "nuget:?package=GitReleaseNotes"

GitTools

Contains functionality related to GitLink.

In order to use the commands for this alias, include the following in your build.cake file to download and install from NuGet.org, or specify the ToolPath within the GitLinkSettings class:

#tool "nuget:?package=gitlink"

GitVersion

Contains functionality related to GitVersion.

In order to use the commands for this alias, include the following in your build.cake file to download and install from NuGet.org, or specify the ToolPath within the GitVersionSettings class:

#tool "nuget:?package=GitVersion.CommandLine"

Globbing Contains functionality related to file system globbing.
HTTP Operations Contains functionality related to HTTP operations
ILMerge

Contains functionality related to ILMerge.

In order to use the commands for this alias, include the following in your build.cake file to download and install from NuGet.org, or specify the ToolPath within the ILMergeSettings class:

#tool "nuget:?package=ilmerge"

ILRepack

Contains functionality related to ILRepack.

In order to use the commands for this alias, include the following in your build.cake file to download and install from NuGet.org, or specify the ToolPath within the ILRepackSettings class:

#tool "nuget:?package=ILRepack"

Inno Setup

Contains functionality related to Inno Setup.

In order to use the commands for this alias, Inno Setup will need to be installed on the machine where the Cake script is being executed. See this page for information on how to download/install.

Logging Contains functionality related to logging.
MSBuild

Contains functionality related to MSBuild.

In order to use the commands for this alias, MSBuild will already have to be installed on the machine the Cake Script is being executed.

MSBuild Resource Contains functionality related to MSBuild solution files.
MSTest

Contains functionality related to running MSTest unit tests.

In order to use the commands for this alias, MSTest will need to be installed on the machine where the Cake script is being executed. This is typically achieved by having either Visual Studio installed, or by using the Micrsoft Build Tools, for example, for 2015.

NSIS

Contains functionality related to NSIS.

In order to use the commands for this alias, NSIS will need to be installed on the machine where the Cake script is being executed. See this page for information on how to download/install.

NUnit

Contains functionality related to running NUnit tests.

In order to use the commands for this alias, include the following in your build.cake file to download and install from NuGet.org, or specify the ToolPath within the NUnitSettings class:

#tool "nuget:?package=NUnit.Runners&version=2.6.4"

NUnit v3

Contains functionality related to running NUnit v2 and v3 unit tests.

In order to use the commands for this alias, include the following in your build.cake file to download and install from NuGet.org, or specify the ToolPath within the NUnit3Settings class:

#tool "nuget:?package=NUnit.ConsoleRunner"

Octopus Deploy

Contains functionality related to Octopus Deploy.

In order to use the commands for this alias, include the following in your build.cake file to download and install from NuGet.org, or specify the ToolPath within the appropriate settings class:

#tool "nuget:?package=OctopusTools"

OpenCover

Contains functionality related to OpenCover.

In order to use the commands for this alias, include the following in your build.cake file to download and install from NuGet.org, or specify the ToolPath within the OpenCoverSettings class:

#tool "nuget:?package=OpenCover"

Process Contains functionality related to processes.
Release Notes Contains functionality related to release notes.
ReportGenerator

Contains functionality related to ReportGenerator.

In order to use the commands for this alias, include the following in your build.cake file to download and install from NuGet.org, or specify the ToolPath within the ReportGeneratorSettings class:

#tool "nuget:?package=ReportGenerator"

ReportUnit

Contains functionality related to ReportUnit.

In order to use the commands for this alias, include the following in your build.cake file to download and install from NuGet.org, or specify the ToolPath within the ReportUnitSettings class:

#tool "nuget:?package=ReportUnit"

ReSharper

Contains functionality related to ReSharper's InspectCode tool.

In order to use the commands for this alias, include the following in your build.cake file to download and install from NuGet.org, or specify the ToolPath within the InspectCodeSettings class:

#tool "nuget:?package=JetBrains.ReSharper.CommandLineTools"

Roundhouse

Contains functionality related to RoundhousE.

In order to use the commands for this alias, include the following in your build.cake file to download and install from NuGet.org, or specify the ToolPath within the RoundhouseSettings class:

#tool "nuget:?package=roundhouse"

Security Contains security related functionality, such as calculating file hashes.
Signing

Contains functionality related to signing assemblies with PFX certificates using SignTool.

In order to use the commands for this alias, SignTool will need to be installed on the machine where the Cake script is being executed. This is typically achieved by installing the correct Windows SDK.

SpecFlow

Contains functionality related to SpecFlow.

In order to use the commands for this alias, include the following in your build.cake file to download and install from NuGet.org, or specify the ToolPath within the appropriate settings class:

#tool "nuget:?package=SpecFlow"

Text

Contains functionality related to TextTransform.

In order to use the commands for this alias, include the following in your build.cake file to download and install from NuGet.org, or specify the ToolPath within the TextTransformSettings class:

#tool "nuget:?package=Mono.TextTransform"

VSTest Contains functionality related to running VSTest unit tests.
WiX

Contains functionality related to WiX.

In order to use the commands for this alias, include the following in your build.cake file to download and install from NuGet.org, or specify the ToolPath within the appropriate settings class:

#tool "nuget:?package=WiX.Toolset"

XBuild

Contains functionality related to XBuild.

In order to use the commands for this alias, XBuild (which is part of Mono) will already have to be installed on the machine the Cake Script is being executed.

XML Contains functionality related to XML XPath queries.
xUnit

Contains functionality related to running xunit tests.

In order to use the commands for this alias, include the following in your build.cake file to download and install from NuGet.org, or specify the ToolPath within the XUnitSettings class:

#tool "nuget:?package=xunit.runners&version=1.9.2"

xUnit v2

Contains functionality related to running xunit tests.

In order to use the commands for this alias, include the following in your build.cake file to download and install from NuGet.org, or specify the ToolPath within the XUnit2Settings class:

#tool "nuget:?package=xunit.runner.console"

Addins
AndroidAppManifest
AppleSimulator
AppPacakager
AppVeyor AppVeyor API related cake aliases.
AutoRest Provides a wrapper around AutoRest functinoality for use in Cake scripts
AzureStorage Contains functionality for workign with Azure Storage
CakeMail The result of CakeMailProvider API post
CMake Contains functionality to running CMake.
CocoaPods Cocoapods aliases.
Communication Contains functionality for working with Plink. Aliases for Putty. Contains functionality for working with PSCP.
Compression Contains functionality related to compress files.
Configuration
Coveralls

Contains aliases related to Coveralls.io.

In order to use the commands for this addin, you will need to include either of the following in your build.cake file to download and reference from NuGet.org:

#tool coveralls.net
#tool coveralls.io
In addition, you will need to include the following:
#addin Cake.Coveralls

Database Cake AddIn that packages multiple SQL Scripts into one file to speed up deployment and minimize the probability of errors.
#addin Cake.SqlServerPackager
Deployment Cake AddIn to upload files using WinSCP.
#addin Cake.WinSCP
DocFx Contains functionality related to DocFx.
Docker Contains functionality for working with docker-compose up command. Contains functionality for working with docker-compose unpause command. Contains functionality for working with docker-compose stop command. Contains functionality for working with docker-compose start command. Contains functionality for working with docker-compose scale command. Contains functionality for working with docker-compose run command. Contains functionality for working with docker-compose rm command. Contains functionality for working with docker-compose restart command. Contains functionality for working with docker-compose pull command. Contains functionality for working with docker-compose build command. Contains functionality for working with docker-compose pause command. Contains functionality for working with docker-compose down command. Contains functionality for working with docker-compose down command. Contains functionality for working with docker-compose build command. Contains functionality for working with create command. Contains functionality for working with cp command. Contains functionality for working with login command. Contains functionality for working with network remove command. Contains functionality for working with network disconnect command. Contains functionality for working with network create command. Contains functionality for working with network connect command. Contains functionality for working with ps command. Contains functionality for working with build command. Contains functionality for working with push command. Contains functionality for working with push command. Contains functionality for working with load command. Contains functionality for working with run command. Contains functionality for working with save command. Contains functionality for working with stop command. Contains functionality for working with rmi command. Contains functionality for working with swarm init command. Contains functionality for working with swarm update command. Contains functionality for working with swarm leave command. Contains functionality for working with swarm join command. Contains functionality for working with tag command. Contains functionality for working with rm command.
DoInDirectory Contains functionality for changing the current directory for an operation
Email

Contains aliases related to emails.

In order to use the commands for this addin, you will need to include the following in your build.cake file to download and reference from NuGet.org:

#addin Cake.Email

Figlet Figlet aliases.
File Helpers File helper aliases.
FluentMigrator

Contains aliases related to FluentMigrator.

In order to use the commands for this addin, you will need to include the following in your build.cake file to download and reference from NuGet.org:

#addin Cake.FluentMigrator

FTP Contains functionality for working with FTP
Gem

Contains functionality related to theRubyGems Package Manager.

In order to use the commands for this addin, the gem utility will need to be installed and available, or you will need to provide a ToolPath to where it can be located, and also you will need to include the following in your build.cake file to download and reference the addin from NuGet.org:

#addin Cake.Gem

Genymotion
Git Class GitAliases. Contains functionality for working with GIT using LibGit2 & LibGit2Sharp
Gitter

Contains aliases related to gitter.im.

In order to use the commands for this addin, you will need to include the following in your build.cake file to download and reference from NuGet.org:

#addin Cake.Gitter

HipChat

Exposes functionality in the HipChat.Net NuGet package as a Cake Addin.

In order to use the commands for this addin, include the following in your build.cake file to download and reference from NuGet.org:

#addin Cake.HipChat

HockeyApp

Contains functionality related to HockeyApp.

It allows you to upload an app package to HockeyApp with just one line of code. In order to use the exposed commands you have to add the following line at top of your build.cake file.

#addin Cake.HockeyApp
Json JSON related cake aliases.
Kudu Contains aliases related to Kudu web site environment and deployment
MSBuildTask Contains MSBuildTask Extensions
MsDeploy

Contains functionality for working with the MsDeploy.exe (Web Deploy) command line interface (cli).

MsDeploy v3.6 will already have to be installed on the machine the Cake Script is being executed on.

See also https://www.microsoft.com/en-us/download/details.aspx?id=43717
Node contains functionality to interact with gulp
Npm Provides a wrapper around Npm functionality within a Cake build script
NuGet Extended NuGet Aliases
Orchard
Paket

Contains functionality for working with paket.

In order to use the commands for this addin, you will need to include the following in your build.cake file:

#addin paket:?package=Cake.Paket
This assumes your using the Cake.Paket.Module. If you'd rather use NuGet then include:
#addin nuget:?package=Cake.Paket
#tool nuget:?package=Paket

plist Contains functionality to work with plist files.
Postman

Contains functionality related to the Newman CLI.

In order to use the commands for this addin, you will need to include the following in your build.cake file to download and reference from NuGet.org:

#addin Cake.Newman

Raygun
ReSharperReports

Contains functionality related to the ReSharperReports tool.

In order to use the commands for this addin, you will need to include the following in your build.cake file to download and reference from NuGet.org:

#tool ReSharperReports
In addition, you will need to include the following:
#addin Cake.ReSharperReports

Semantic Versioning File helper aliases.
SemVer

Contains functionality related to the SemVer.FromAssembly.

In order to use the commands for this addin, the SemVer.FromAssembly utility will need to be installed and available, or you will need to provide a ToolPath to where it can be located, and also you will need to include the following in your build.cake file to download and reference the addin from NuGet.org:

#addin Cake.SemVer.FromAssembly

SendGrid

Contains aliases related to SendGrid.

In order to use the commands for this addin, you will need to include the following in your build.cake file to download and reference from NuGet.org:

#addin Cake.SendGrid

Slack Contains aliases related to Slack API
Sonar

Contains functionality for running a Sonar analysis on a c# project using the MSBuild SonarQube Runner.

In order to use the commands for this addin, include the following in your build.cake file to download and reference from NuGet.org:

#addin "nuget:?package=Cake.Sonar"
#tool "nuget:?package=MSBuild.SonarQube.Runner.Tool"

SqlServer

Contains functionality to deal with SQL Server: DropDatabase, CreateDatabase, execute SQL, execute SQL from files, etc. Also provides functionality to manage LocalDb instances: Create, Start, Stop, Delete instances.

In order to use the commands for this addin, include the following in your build.cake file to download and reference from NuGet.org:

#addin "nuget:?package=Cake.SqlServer"

Squirrel
Strong Naming Strong Name (sn.exe) tool aliases. It is possible to resign a delay-signed assembly. The resign alias uses the sn.exe containers to resign the specified assemblies. the aliases also provide verification functionallity. The verify alias will check if an assembly has a strong name or not. If one has turned off strong name verification, you can still verify by using the Cake.StrongNameTool.StrongNameToolSettings.ForceVerification set to true.
Stylecop Contains functionality for working with Stylecop.
Swagger Alias to access the code generation functionality from the NSwag toolchain
Tfx

Contains functionality related to the TFS Cross Platform Command Line Interface.

In order to use the commands for this addin, the tfx-cli utility will need to be installed and available, or you will need to provide a ToolPath to where it can be located, and also you will need to include the following in your build.cake file to download and reference the addin from NuGet.org:

#addin Cake.Tfx

Twitter

Contains functionality related to Twitter REST API.

In order to use the commands for this addin, include the following in your build.cake file to download and reference from NuGet.org:

#addin Cake.Twitter

Vagrant Gets a runner to control Vagrant through the CLI. See the documentation on GitHub for a full API reference.
Version Reader Contains functionality for retrieving version numbers from assemblies
VS .proj file helpers Helpers to ease manipulation of vs proj files.
Vsce

Contains aliases related to VSCode Extension Manager.

In order to use the commands for this addin, you will need to include the following in your build.cake file to download and reference from NuGet.org:

#addin Cake.VsCode

Watch Contains functionality for watching file changes.
Webpack Provides a wrapper around Webpack functionality within a Cake build script
Wyam

Contains functionality related to Wyam.

In order to use the commands for this alias, include the following in your build.cake file to download and install from NuGet.org, or specify the ToolPath within the WyamSettings class:

#addin "nuget:?package=Cake.Wyam"
#tool "nuget:?package=Wyam"

Xamarin Xamarin related cake aliases.
XCode XCode aliases.
XDT
Yaml YAML related cake aliases.
Yarn Provides a wrapper around Yarn functionality within a Cake build script