Reference

This reference guide describes the various methods and properties which you can use directly from inside a Cake build script. These are implemented as script aliases.

Click on any alias to get detailed information about parameters and examples how to use the alias.

Creating Issue Reports

Creating Issues

NewIssue(ICakeContext, string, string, string) Initiates the creation of a new IIssue with message as identifier.
Addin from Cake.Issues.dll
NewIssue(ICakeContext, string, string, string, string) Initiates the creation of a new IIssue.
Addin from Cake.Issues.dll

File Linking

IssueFileLinkSettings(ICakeContext, Func<IIssue, Uri>) Gets an instance of the file link settings for linking to files based on a custom action.
Addin from Cake.Issues.dll
IssueFileLinkSettings(ICakeContext, string) Gets an instance of the file link settings for linking to files based on a custom pattern.
Addin from Cake.Issues.dll
IssueFileLinkSettingsForAzureDevOpsBranch(ICakeContext, Uri, string) Gets an instance of the file link settings for linking to files hosted in Azure DevOps on a specific branch.
Addin from Cake.Issues.dll
IssueFileLinkSettingsForAzureDevOpsBranch(ICakeContext, Uri, string, string) Gets an instance of the file link settings for linking to files hosted in Azure DevOps in a sub-folder on a specific branch.
Addin from Cake.Issues.dll
IssueFileLinkSettingsForAzureDevOpsCommit(ICakeContext, Uri, string) Gets an instance of the file link settings for linking to files hosted in Azure DevOps for a specific commit.
Addin from Cake.Issues.dll
IssueFileLinkSettingsForAzureDevOpsCommit(ICakeContext, Uri, string, string) Gets an instance of the file link settings for linking to files hosted in Azure DevOps in a sub-folder for a specific commit.
Addin from Cake.Issues.dll
IssueFileLinkSettingsForGitHubBranch(ICakeContext, Uri, string) Gets an instance of the file link settings for linking files hosted on GitHub on a specific branch.
Addin from Cake.Issues.dll
IssueFileLinkSettingsForGitHubBranch(ICakeContext, Uri, string, string) Gets an instance of the file link settings for linking files hosted on GitHub in a sub-folder on a specific branch.
Addin from Cake.Issues.dll
IssueFileLinkSettingsForGitHubCommit(ICakeContext, Uri, string) Gets an instance of the file link settings for linking files hosted on GitHub fo a specific commit.
Addin from Cake.Issues.dll
IssueFileLinkSettingsForGitHubCommit(ICakeContext, Uri, string, string) Gets an instance of the file link settings for linking files hosted on GitHub in a sub-folder for a specific commit.
Addin from Cake.Issues.dll

Issue Providers

DocFxIssues(ICakeContext, DocFxIssuesSettings) Gets an instance of a provider for warnings reported by DocFx using specified settings.
Addin from Cake.Issues.DocFx.dll
DocFxIssuesFromContent(ICakeContext, string) Gets an instance of a provider for warnings reported by DocFx using log file content for a DocFx project in the repository root.
Addin from Cake.Issues.DocFx.dll
DocFxIssuesFromContent(ICakeContext, string, DirectoryPath) Gets an instance of a provider for warnings reported by DocFx using log file content.
Addin from Cake.Issues.DocFx.dll
DocFxIssuesFromFilePath(ICakeContext, FilePath) Gets an instance of a provider for warnings reported by DocFx using a log file from disk for a DocFx project in the repository root.
Addin from Cake.Issues.DocFx.dll
DocFxIssuesFromFilePath(ICakeContext, FilePath, DirectoryPath) Gets an instance of a provider for warnings reported by DocFx using a log file from disk.
Addin from Cake.Issues.DocFx.dll
DocFxIssuesProviderTypeName Gets the name of the DocFx issue provider. This name can be used to identify issues based on the ProviderType property.
Addin from Cake.Issues.DocFx.dll
DupFinderIssues(ICakeContext, DupFinderIssuesSettings) Gets an instance of a provider for issues reported by JetBrains dupFinder using specified settings.
Addin from Cake.Issues.DupFinder.dll
DupFinderIssuesFromContent(ICakeContext, string) Gets an instance of a provider for issues reported by JetBrains dupFinder using log file content.
Addin from Cake.Issues.DupFinder.dll
DupFinderIssuesFromFilePath(ICakeContext, FilePath) Gets an instance of a provider for issues reported by JetBrains dupFinder using a log file from disk.
Addin from Cake.Issues.DupFinder.dll
DupFinderIssuesProviderTypeName Gets the name of the dupFinder issue provider. This name can be used to identify issues based on the ProviderType property.
Addin from Cake.Issues.DupFinder.dll
EsLintAddRuleUrlResolver(ICakeContext, Func<BaseRuleDescription, Uri>) Registers a new URL resolver with default priority of 0.
Addin from Cake.Issues.EsLint.dll
EsLintAddRuleUrlResolver(ICakeContext, Func<BaseRuleDescription, Uri>, int) Registers a new URL resolver with a specific priority.
Addin from Cake.Issues.EsLint.dll
EsLintIssues(ICakeContext, EsLintIssuesSettings) Gets an instance of a provider for issues reported by ESLint using specified settings.
Addin from Cake.Issues.EsLint.dll
EsLintIssuesFromContent(ICakeContext, string, BaseEsLintLogFileFormat) Gets an instance of a provider for issues reported by ESLint using log file content.
Addin from Cake.Issues.EsLint.dll
EsLintIssuesFromFilePath(ICakeContext, FilePath, BaseEsLintLogFileFormat) Gets an instance of a provider for issues reported by ESLint using a log file from disk.
Addin from Cake.Issues.EsLint.dll
EsLintIssuesProviderTypeName Gets the name of the ESLint issue provider. This name can be used to identify issues based on the ProviderType property.
Addin from Cake.Issues.EsLint.dll
EsLintJsonFormat Gets an instance for the ESLint JSON log format as written by the JSON formatter.
Addin from Cake.Issues.EsLint.dll
GitRepositoryIssues(ICakeContext, GitRepositoryIssuesSettings) Gets an instance of a provider for analyzing a Git repository and reporting issues using specified settings.
Addin from Cake.Issues.GitRepository.dll
GitRepositoryIssuesProviderTypeName Gets the name of the Git repository issue provider. This name can be used to identify issues based on the ProviderType property.
Addin from Cake.Issues.GitRepository.dll
InspectCodeIssues(ICakeContext, InspectCodeIssuesSettings) Gets an instance of a provider for issues reported by JetBrains Inspect Code using specified settings.
Addin from Cake.Issues.InspectCode.dll
InspectCodeIssuesFromContent(ICakeContext, string) Gets an instance of a provider for issues reported by JetBrains Inspect Code using log file content.
Addin from Cake.Issues.InspectCode.dll
InspectCodeIssuesFromFilePath(ICakeContext, FilePath) Gets an instance of a provider for issues reported by JetBrains Inspect Code using a log file from disk.
Addin from Cake.Issues.InspectCode.dll
InspectCodeIssuesProviderTypeName Gets the name of the Inspect Code issue provider. This name can be used to identify issues based on the ProviderType property.
Addin from Cake.Issues.InspectCode.dll
MarkdownlintAddRuleUrlResolver(ICakeContext, Func<MarkdownlintRuleDescription, Uri>) Registers a new URL resolver with default priority of 0.
Addin from Cake.Issues.Markdownlint.dll
MarkdownlintAddRuleUrlResolver(ICakeContext, Func<MarkdownlintRuleDescription, Uri>, int) Registers a new URL resolver with a specific priority.
Addin from Cake.Issues.Markdownlint.dll
MarkdownlintCliJsonLogFileFormat Gets an instance for the log format as written by markdownlint-cli with --json parameter.
Addin from Cake.Issues.Markdownlint.dll
MarkdownlintCliLogFileFormat Gets an instance for the log format as written by markdownlint-cli.
Addin from Cake.Issues.Markdownlint.dll
MarkdownlintIssues(ICakeContext, MarkdownlintIssuesSettings) Gets an instance of a provider for issues reported by Markdownlint using specified settings.
Addin from Cake.Issues.Markdownlint.dll
MarkdownlintIssuesFromContent(ICakeContext, string, BaseMarkdownlintLogFileFormat) Gets an instance of a provider for issues reported by Markdownlint using log file content.
Addin from Cake.Issues.Markdownlint.dll
MarkdownlintIssuesFromFilePath(ICakeContext, FilePath, BaseMarkdownlintLogFileFormat) Gets an instance of a provider for issues reported by Markdownlint using a log file from disk.
Addin from Cake.Issues.Markdownlint.dll
MarkdownlintIssuesProviderTypeName Gets the name of the Markdownlint issue provider. This name can be used to identify issues based on the ProviderType property.
Addin from Cake.Issues.Markdownlint.dll
MarkdownlintV1LogFileFormat Gets an instance for the log format as written by Markdownlint with options.resultVersion set to 1.
Addin from Cake.Issues.Markdownlint.dll
MsBuildAddRuleUrlResolver(ICakeContext, Func<MsBuildRuleDescription, Uri>) Registers a new URL resolver with default priority of 0.
Addin from Cake.Issues.MsBuild.dll
MsBuildAddRuleUrlResolver(ICakeContext, Func<MsBuildRuleDescription, Uri>, int) Registers a new URL resolver with a specific priority.
Addin from Cake.Issues.MsBuild.dll
MsBuildBinaryLogFileFormat Gets an instance for the MsBuild binary log format.
Addin from Cake.Issues.MsBuild.dll
MsBuildIssues(ICakeContext, MsBuildIssuesSettings) Gets an instance of a provider for issues reported as MsBuild warnings using specified settings.
Addin from Cake.Issues.MsBuild.dll
MsBuildIssuesFromContent(ICakeContext, string, BaseMsBuildLogFileFormat) Gets an instance of a provider for issues reported as MsBuild warnings using log content.
Addin from Cake.Issues.MsBuild.dll
MsBuildIssuesFromFilePath(ICakeContext, FilePath, BaseMsBuildLogFileFormat) Gets an instance of a provider for issues reported as MsBuild warnings using a log file from disk.
Addin from Cake.Issues.MsBuild.dll
MsBuildIssuesProviderTypeName Gets the name of the MsBuild issue provider. This name can be used to identify issues based on the ProviderType property.
Addin from Cake.Issues.MsBuild.dll
MsBuildXmlFileLoggerFormat

Gets an instance for the MsBuild log format as written by the XmlFileLogger class from MSBuild Extension Pack.

You can add the logger to the MSBuildSettings like this:

var settings = new MSBuildSettings()
    .WithLogger(
        Context.Tools.Resolve("MSBuild.ExtensionPack.Loggers.dll").FullPath,
        "XmlFileLogger",
        string.Format(
            "logfile=\"{0}\";verbosity=Detailed;encoding=UTF-8",
            @"c:\build\msbuild.log")
    );

In order to use the above logger, include the following in your build.cake file to download and install from NuGet.org:

#tool "nuget:?package=MSBuild.Extension.Pack"


Addin from Cake.Issues.MsBuild.dll
TerraformIssues(ICakeContext, TerraformIssuesSettings) Gets an instance of a provider for reading output from terraform validate -json using specified settings.
Addin from Cake.Issues.Terraform.dll
TerraformIssuesFromContent(ICakeContext, string) Gets an instance of a provider for reading output from terraform validate -json for Terraform scripts in the repository root.
Addin from Cake.Issues.Terraform.dll
TerraformIssuesFromContent(ICakeContext, string, DirectoryPath) Gets an instance of a provider for reading output from terraform validate -json.
Addin from Cake.Issues.Terraform.dll
TerraformIssuesFromFilePath(ICakeContext, FilePath) Gets an instance of a provider for reading output from terraform validate -json from disk for Terraform scripts in the repository root.
Addin from Cake.Issues.Terraform.dll
TerraformIssuesFromFilePath(ICakeContext, FilePath, DirectoryPath) Gets an instance of a provider for reading output from terraform validate -json from disk.
Addin from Cake.Issues.Terraform.dll
TerraformIssuesProviderTypeName Gets the name of the Terraform issue provider. This name can be used to identify issues based on the ProviderType property.
Addin from Cake.Issues.Terraform.dll

Issue Serialization

DeserializeIssueFromJsonFile(ICakeContext, FilePath) Deserializes an Issue from a JSON file.
Addin from Cake.Issues.dll
DeserializeIssueFromJsonString(ICakeContext, string) Deserializes an Issue from a JSON string.
Addin from Cake.Issues.dll
DeserializeIssuesFromJsonFile(ICakeContext, FilePath) Deserializes an System.Collections.Generic.IEnumerable`1 from a JSON file.
Addin from Cake.Issues.dll
DeserializeIssuesFromJsonString(ICakeContext, string) Deserializes an System.Collections.Generic.IEnumerable`1 from a JSON string.
Addin from Cake.Issues.dll
SerializeIssuesToJsonFile(ICakeContext, IEnumerable<IIssue>, FilePath) Serializes an System.Collections.Generic.IEnumerable`1 to a JSON file.
Addin from Cake.Issues.dll
SerializeIssuesToJsonString(ICakeContext, IEnumerable<IIssue>) Serializes an System.Collections.Generic.IEnumerable`1 to a JSON string.
Addin from Cake.Issues.dll
SerializeIssueToJsonFile(ICakeContext, IIssue, FilePath) Serializes an IIssue to a JSON file.
Addin from Cake.Issues.dll
SerializeIssueToJsonString(ICakeContext, IIssue) Serializes an IIssue to a JSON string.
Addin from Cake.Issues.dll

Pull Request Systems

AppVeyorBuilds(ICakeContext) Gets an object for writing issues to AppVeyor builds using the default settings.
Addin from Cake.Issues.PullRequests.AppVeyor.dll
AppVeyorBuilds(ICakeContext, AppVeyorBuildSettings) Gets an object for writing issues to AppVeyor builds using the specified settings.
Addin from Cake.Issues.PullRequests.AppVeyor.dll
AzureDevOpsPullRequests(ICakeContext) Gets an object for writing issues to Azure DevOps pull request where all required data (including authentication token) is taken from the environment variables set by Azure Pipelines.
Addin from Cake.Issues.PullRequests.AzureDevOps.dll
AzureDevOpsPullRequests(ICakeContext, AzureDevOpsPullRequestSystemSettings) Gets an object for writing issues to Azure DevOps pull request using the specified settings.
Addin from Cake.Issues.PullRequests.AzureDevOps.dll
AzureDevOpsPullRequests(ICakeContext, IAzureDevOpsCredentials) Gets an object for writing issues to Azure DevOps pull request where all required data is taken from the environment variables set by Azure Pipelines.
Addin from Cake.Issues.PullRequests.AzureDevOps.dll
AzureDevOpsPullRequests(ICakeContext, Uri, int, IAzureDevOpsCredentials) Gets an object for writing issues to Azure DevOps pull request in a specific repository and with a specific ID.
Addin from Cake.Issues.PullRequests.AzureDevOps.dll
AzureDevOpsPullRequests(ICakeContext, Uri, string, IAzureDevOpsCredentials) Gets an object for writing issues to Azure DevOps pull request in a specific repository and for a specific source branch.
Addin from Cake.Issues.PullRequests.AzureDevOps.dll
GitHubActionsBuilds(ICakeContext) Gets an object for writing issues to GitHub Actions using the default settings.
Addin from Cake.Issues.PullRequests.GitHubActions.dll
GitHubActionsBuilds(ICakeContext, GitHubActionsBuildSettings) Gets an object for writing issues to GitHub Actions using the specified settings.
Addin from Cake.Issues.PullRequests.GitHubActions.dll

Reading Issues

ReadIssues(ICakeContext, IEnumerable<IIssueProvider>, DirectoryPath) Reads issues from issue providers.
Addin from Cake.Issues.dll
ReadIssues(ICakeContext, IEnumerable<IIssueProvider>, IReadIssuesSettings) Reads issues from issue providers using the specified settings.
Addin from Cake.Issues.dll
ReadIssues(ICakeContext, IIssueProvider, DirectoryPath) Reads issues from a single issue provider.
Addin from Cake.Issues.dll
ReadIssues(ICakeContext, IIssueProvider, IReadIssuesSettings) Reads issues from a single issue provider using the specified settings.
Addin from Cake.Issues.dll

Reporting Formats

ConsoleIssueReportFormat(ICakeContext) Gets an instance of the console report format using default settings.
Addin from Cake.Issues.Reporting.Console.dll
ConsoleIssueReportFormat(ICakeContext, ConsoleIssueReportFormatSettings) Gets an instance of the console report format using specified settings.
Addin from Cake.Issues.Reporting.Console.dll
GenericIssueReportFormat(ICakeContext, GenericIssueReportFormatSettings) Gets an instance of a the generic report format using specified settings.
Addin from Cake.Issues.Reporting.Generic.dll
GenericIssueReportFormatFromContent(ICakeContext, string) Gets an instance of a the generic report format using a template string.
Addin from Cake.Issues.Reporting.Generic.dll
GenericIssueReportFormatFromContent(ICakeContext, string, Action<GenericIssueReportFormatSettings>) Gets an instance of a the generic report format using a template string with custom settings.
Addin from Cake.Issues.Reporting.Generic.dll
GenericIssueReportFormatFromEmbeddedTemplate(ICakeContext, GenericIssueReportTemplate) Gets an instance of a the generic report format using an embedded template.
Addin from Cake.Issues.Reporting.Generic.dll
GenericIssueReportFormatFromEmbeddedTemplate(ICakeContext, GenericIssueReportTemplate, Action<GenericIssueReportFormatSettings>) Gets an instance of a the generic report format using an embedded template with custom settings.
Addin from Cake.Issues.Reporting.Generic.dll
GenericIssueReportFormatFromFilePath(ICakeContext, FilePath) Gets an instance of a the generic report format using a local template.
Addin from Cake.Issues.Reporting.Generic.dll
GenericIssueReportFormatFromFilePath(ICakeContext, FilePath, Action<GenericIssueReportFormatSettings>) Gets an instance of a the generic report format using a local template with custom settings.
Addin from Cake.Issues.Reporting.Generic.dll
SarifIssueReportFormat(ICakeContext) Gets an instance of the SARIF report format using default settings.
Addin from Cake.Issues.Reporting.Sarif.dll
SarifIssueReportFormat(ICakeContext, SarifIssueReportFormatSettings) Gets an instance of the SARIF report format using specified settings.
Addin from Cake.Issues.Reporting.Sarif.dll

Reporting Issues To Pull Requests

GitHub