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

Category Summary
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.

Compression Contains functionality related to compress files.
Directory Operations Several extension methods when operating on a Directory.
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 Several extension methods when using Environment Variables.
File Operations Contains functionality for working with Plink. Aliases for Putty. Contains functionality for working with PSCP.
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"

GitLink

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&version=2.4.0"

GitLink v3

Contains functionality related to GitLink version 3.

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 GitLink3Settings class:

#tool "nuget:?package=gitlink"

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"

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 XML document 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.

NuGet Contains functionality for working with NuGet.
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 for working with VsixSignTool. Aliases for VsixSignTool.
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.
VSWhere

Contains functionality related to running VSWhere 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 settings class:

#tool "nuget:?package=vswhere"

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 XSL transformation.
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.runner.console&version=2.2.0"

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

Category Summary
ActiveDirectory Contains functionality related to managing Active Directory.
Android Cake build aliases for Android ADB Package Manager commands
Android SDK Manager Android SDK related aliases.
AndroidAppManifest
Apigee Contains functionality for proxy import and deployments within Apigee.
AppleSimulator
AppPacakager
AppVeyor AppVeyor API related cake aliases.
Assembly Info Contains functionality related to assembly info.
AutoRest Provides a wrapper around AutoRest functinoality for use in Cake scripts
AWS Contains Cake aliases for configuring Amazon Elastic Load Balancers
Azure Contains Cake aliases for running commands managing Azure resource groups.
AzureStorage Contains functionality for workign with Azure Storage
Bumpy

Contains functionality related to the command line tool Bumpy.

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 Bumpy
In addition, you will need to include the following:
#addin Cake.Bumpy

Cake Extension for XcStudio Cake Extension for XComponent Studio
Cake Extension for XcTools Cake Extension for XComponent Tools
CakeMail

Contains aliases related to CakeMail.

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.CakeMail

Chutzpah Contains functionality related to running javascript unit tests using Chutzpah.
CMake Contains functionality to running CMake.
CocoaPods Cocoapods aliases.
Code Analysis Reporting Contains functionality for creating report from code analysis log files.
Codecov

Uploads coverage reports to Codecov. Note that, many CI services (like AppVeyor) do not require you to provide a Codecov upload token. However, TeamCity is a rare exception.

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

#tool nuget:?package=Codecov
#addin nuget:?package=Cake.Codecov

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
CsvHelper Contians functionality related to reading and writing CSV files.
Curl

Contains aliases related to curl.

In order to use the commands for this add-in, a version of curl will need to be installed on the machine where the Cake script is being executed. While curl is usually included in most Unix-based operating systems, you will likely have to install it yourself on Windows. The Windows version of curl is also part of Cygwin.

#addin Cake.Curl
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
Directory Operations Several extension methods when operating on a Directory.
DocFx Contains functionality related to building websites using DocFx.
Docker Contains functionality for working with Docker commands.
Documentation Contains functionality to convert markdown to pdf files
DoInDirectory Contains functionality for changing the current directory for an operation
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.

DotNetCoreEf
Email The result of EmailProvider
Ember

Contains functionality related to the Ember CLI.

In order to use the commands for this addin, the Ember 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.Ember

Endpoint Collection of Cake.Endpoint aliases that will be injected into the cake context.
EntityFramework A set of Cake aliases for Entity Framework (not .NET Core) code-first migrations.
Environment Several extension methods when using Environment Variables.
Figlet Figlet aliases.
File Helpers File helper aliases. A set of aliases for Cake Build to help with simple File operations such as Reading, Writing and Replacing text.
File Operations Contains functionality for working with Plink. Aliases for Putty. Contains functionality for working with PSCP.
FileSet Contains functionality for creating filesets based on includes and excludes.
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 the RubyGems 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 Cake AddIn which copies files based on Git log.
#addin Cake.GitPackager
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

Globbing Contains functionality related to file system globbing.
Guard Contains extensions for guard clauses
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
Hosts

Functionalty to operate hosts-file. Requres admin permissions and will probably fail on your general CI server.

Mostly aimed on automation scripts rather than actual project builds.

Install via:
#addin "nuget:?package=Cake.Hosts"
HTTP Operations Contains functionality related to HTTP operations
JMeter Contains functionality for using the JMeter tool
Json JSON related cake aliases.
KeePass
Kudu Contains aliases related to Kudu web site environment and deployment
Microsoft Teams Contains functionality related to Microsoft Teams.
MSBuild Resource Contains functionality related to MSBuild XML document files.
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
NuGet Contains functionality for working with NuGet.
OctoDeploy Simple GitHub release publishing
OctoVariableImport
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

Path Contains functionality for manipulating the path.
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

Pull Request Code Analysis Contains functionality related to writing code analysis issues to pull requests.
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

ResxConverter Contains alias for converting .NET Resx files to different output formats.
Scripty

Alias to evaluate C# scripts using Scripty

#tool "nuget:?package=Scripty"
Semantic Versioning Semantic Versioning aliases.
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

Services Windows service aliases.
Signing Contains functionality for working with VsixSignTool. Aliases for VsixSignTool.
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"

SonarScanner Contains functionality for using the Sonar Scanner tool
SqlPackage
SqlServer Contains functionality to deal with DAC functionality from SQL Server: create and restore BACPAC files; create and restore DACPAC files
SqlTools Contains Cake aliases for executing sql queries
Squirrel Contains functionality related to running Squirrel.
Storyteller Alias for Cake Storyteller
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 functionality. The verify alias will check if an assembly has a strong name or not. ForceVerification set to true.
Swagger Alias to access the code generation functionality from the NSwag toolchain
SynVer

Contains functionality related to the SyntacticVersioning.

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 the addin from NuGet.org:

#addin Cake.SynVer

Terraform
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

Topshelf Topshelf aliases
Transifex Provides a wrapper around transifex client functionality within a Cake build script.
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

VsMetrics

Contains functionality related to Visual studio's metrics.exe command line tool.

In order to use the commands for this addin, you will need to install the metrics power tool (which is currently not included in a Visual Studio installation). Afterwards include the Addin in your cake build script and you are ready to go:

#addin Cake.VsMetrics

Watch Contains functionality for watching file changes.
WebDeploy Contains Cake aliases for WebDeploy
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 Contains functionality for working with XDT transformations.
Yaml YAML related cake aliases.
Yarn Provides a wrapper around Yarn functionality within a Cake build script
Yeoman Provides a wrapper around Yeoman functionality within a Cake build script.