MsBuildIssuesAliases Class

Summary

Contains functionality related to importing code analysis issues from MSBuild logs to write them to pull requests.
Assembly
Cake.Prca.Issues.MsBuild.dll
Namespace
Cake.Prca.Issues.MsBuild
Base Types
  • object
graph TD Base0["object"]-->Type Type["MsBuildIssuesAliases"] class Type type-node

Syntax

public static class MsBuildIssuesAliases

Attributes

Type Description
CakeAliasCategoryAttribute

Methods

Name Value Summary
MsBuildAddRuleUrlResolver(ICakeContext, Func<MsBuildRuleDescription, Uri>) void
Registers a new URL resolver with default priority of 0.
static
MsBuildAddRuleUrlResolver(ICakeContext, Func<MsBuildRuleDescription, Uri>, int) void
Registers a new URL resolver with a specific priority.
static
MsBuildIssues(ICakeContext, MsBuildIssuesSettings) ICodeAnalysisProvider
Gets an instance of a provider for code analysis issues reported as MsBuild warnings using specified settings.
static
MsBuildIssuesFromContent(ICakeContext, string, ILogFileFormat) ICodeAnalysisProvider
Gets an instance of a provider for code analysis issues reported as MsBuild warnings using log content.
static
MsBuildIssuesFromFilePath(ICakeContext, FilePath, ILogFileFormat) ICodeAnalysisProvider
Gets an instance of a provider for code analysis issues reported as MsBuild warnings using a log file from disk.
static
MsBuildXmlFileLoggerFormat(ICakeContext) ILogFileFormat

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"

static
GitHub