Preprocessor Directives

Cake scripts have support for pre-processor line directives, which run before the script is executed. These can be used to reference other scripts, assemblies, namespaces and more.

Preprocessor directives are not required or available when running with Cake Frosting.

Addin directive Directive to install and reference addins using NuGet
Load directive Directive to reference external Cake scripts
Reference directive Directive to reference external assemblies for use in your scripts
Tool directive Directive to install external command-line tools
Shebang directive Directive to define the interpreter
Break directive Directive to stop while debugging
Module directive Directive to add Cake modules
Define directive Directive for conditional code execution