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.

General

ReadIssues(ICakeContext, ICodeAnalysisProvider, DirectoryPath) Reads issues from a single issue provider.
Addin from Cake.Prca.dll
ReadIssues(ICakeContext, ICodeAnalysisProvider, ReadIssuesSettings) Reads issues from a single issue provider using the specified settings.
Addin from Cake.Prca.dll
ReadIssues(ICakeContext, IEnumerable<ICodeAnalysisProvider>, DirectoryPath) Reads issues from issue providers.
Addin from Cake.Prca.dll
ReadIssues(ICakeContext, IEnumerable<ICodeAnalysisProvider>, ReadIssuesSettings) Reads issues from issue providers using the specified settings.
Addin from Cake.Prca.dll
ReportIssuesToPullRequest(ICakeContext, ICodeAnalysisProvider, IPullRequestSystem, DirectoryPath) Reports code analysis issues to pull requests.
Addin from Cake.Prca.dll
ReportIssuesToPullRequest(ICakeContext, ICodeAnalysisProvider, IPullRequestSystem, ReportIssuesToPullRequestSettings) Reports code analysis issues to pull requests using the specified settings.
Addin from Cake.Prca.dll
ReportIssuesToPullRequest(ICakeContext, IEnumerable<ICodeAnalysisProvider>, IPullRequestSystem, DirectoryPath) Reports code analysis issues to pull requests.
Addin from Cake.Prca.dll
ReportIssuesToPullRequest(ICakeContext, IEnumerable<ICodeAnalysisProvider>, IPullRequestSystem, ReportIssuesToPullRequestSettings) Reports code analysis issues to pull requests using the specified settings.
Addin from Cake.Prca.dll

Code Analysis Provider

DocFxIssues(ICakeContext, DocFxIssuesSettings) Gets an instance of a provider for warnings reported by DocFx using specified settings.
Addin from Cake.Prca.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.Prca.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.Prca.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.Prca.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.Prca.Issues.DocFx.dll
EsLintAddRuleUrlResolver(ICakeContext, Func<BaseRuleDescription, Uri>) Registers a new URL resolver with default priority of 0.
Addin from Cake.Prca.Issues.EsLint.dll
EsLintAddRuleUrlResolver(ICakeContext, Func<BaseRuleDescription, Uri>, int) Registers a new URL resolver with a specific priority.
Addin from Cake.Prca.Issues.EsLint.dll
EsLintIssues(ICakeContext, EsLintIssuesSettings) Gets an instance of a provider for code analysis issues reported by ESLint using specified settings.
Addin from Cake.Prca.Issues.EsLint.dll
EsLintIssuesFromContent(ICakeContext, string, ILogFileFormat) Gets an instance of a provider for code analysis issues reported by ESLint using log file content.
Addin from Cake.Prca.Issues.EsLint.dll
EsLintIssuesFromFilePath(ICakeContext, FilePath, ILogFileFormat) Gets an instance of a provider for code analysis issues reported by ESLint using a log file from disk.
Addin from Cake.Prca.Issues.EsLint.dll
EsLintJsonFormat Gets an instance for the ESLint JSON log format as written by the JSON formatter.
Addin from Cake.Prca.Issues.EsLint.dll
InspectCodeIssues(ICakeContext, InspectCodeIssuesSettings) Gets an instance of a provider for code analysis issues reported by JetBrains Inspect Code using specified settings.
Addin from Cake.Prca.Issues.InspectCode.dll
InspectCodeIssuesFromContent(ICakeContext, string) Gets an instance of a provider for code analysis issues reported by JetBrains Inspect Code using log file content.
Addin from Cake.Prca.Issues.InspectCode.dll
InspectCodeIssuesFromFilePath(ICakeContext, FilePath) Gets an instance of a provider for code analysis issues reported by JetBrains Inspect Code using a log file from disk.
Addin from Cake.Prca.Issues.InspectCode.dll
MarkdownlintIssues(ICakeContext, MarkdownlintIssuesSettings) Gets an instance of a provider for code analysis issues reported by Markdownlint using specified settings.
Addin from Cake.Prca.Issues.Markdownlint.dll
MarkdownlintIssuesFromContent(ICakeContext, string) Gets an instance of a provider for code analysis issues reported by Markdownlint using log file content.
Addin from Cake.Prca.Issues.Markdownlint.dll
MarkdownlintIssuesFromFilePath(ICakeContext, FilePath) Gets an instance of a provider for code analysis issues reported by Markdownlint using a log file from disk.
Addin from Cake.Prca.Issues.Markdownlint.dll
MsBuildAddRuleUrlResolver(ICakeContext, Func<MsBuildRuleDescription, Uri>) Registers a new URL resolver with default priority of 0.
Addin from Cake.Prca.Issues.MsBuild.dll
MsBuildAddRuleUrlResolver(ICakeContext, Func<MsBuildRuleDescription, Uri>, int) Registers a new URL resolver with a specific priority.
Addin from Cake.Prca.Issues.MsBuild.dll
MsBuildIssues(ICakeContext, MsBuildIssuesSettings) Gets an instance of a provider for code analysis issues reported as MsBuild warnings using specified settings.
Addin from Cake.Prca.Issues.MsBuild.dll
MsBuildIssuesFromContent(ICakeContext, string, ILogFileFormat) Gets an instance of a provider for code analysis issues reported as MsBuild warnings using log content.
Addin from Cake.Prca.Issues.MsBuild.dll
MsBuildIssuesFromFilePath(ICakeContext, FilePath, ILogFileFormat) Gets an instance of a provider for code analysis issues reported as MsBuild warnings using a log file from disk.
Addin from Cake.Prca.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.Prca.Issues.MsBuild.dll

Pull Request System

TfsAuthenticationAzureActiveDirectory(ICakeContext, string, string) Returns credentials for authentication with an Azure Active Directory.
Addin from Cake.Prca.PullRequests.Tfs.dll
TfsAuthenticationBasic(ICakeContext, string, string) Returns credentials for basic authentication. Can only be used for on-premise Team Foundation Server configured for basic authentication. See https://www.visualstudio.com/en-us/docs/integrate/get-started/auth/tfs-basic-auth.
Addin from Cake.Prca.PullRequests.Tfs.dll
TfsAuthenticationNtlm(ICakeContext) Returns credentials for integrated / NTLM authentication. Can only be used for on-premise Team Foundation Server.
Addin from Cake.Prca.PullRequests.Tfs.dll
TfsAuthenticationOAuth(ICakeContext, string) Returns credentials for OAuth authentication. Can only be used with Visual Studio Team Services.
Addin from Cake.Prca.PullRequests.Tfs.dll
TfsAuthenticationPersonalAccessToken(ICakeContext, string) Returns credentials for authentication with a personal access token. Can be used for Team Foundation Server and Visual Studio Team Services.
Addin from Cake.Prca.PullRequests.Tfs.dll
TfsPullRequests(ICakeContext, TfsPullRequestSettings) Gets an object for writing issues to Team Foundation Server or Visual Studio Team Services pull request using the specified settings.
Addin from Cake.Prca.PullRequests.Tfs.dll
TfsPullRequests(ICakeContext, Uri, int, IPrcaCredentials) Gets an object for writing issues to Team Foundation Server or Visual Studio Team Services pull request in a specific repository and with a specific ID.
Addin from Cake.Prca.PullRequests.Tfs.dll
TfsPullRequests(ICakeContext, Uri, string, IPrcaCredentials) Gets an object for writing issues to Team Foundation Server or Visual Studio Team Services pull request in a specific repository and for a specific source branch.
Addin from Cake.Prca.PullRequests.Tfs.dll
TfsVotePullRequest(ICakeContext, TfsPullRequestSettings, TfsPullRequestVote) Votes for the Team Foundation Server or Visual Studio Team Services pull request using the specified settings.
Addin from Cake.Prca.PullRequests.Tfs.dll
GitHub