MsBuildIssuesAliases Class

Summary

Contains functionality for reading warnings from MSBuild log files.
Assembly
Cake.Issues.MsBuild.dll
Namespace
Cake.Issues.MsBuild
Base Types
  • Object
graph BT Type-->Base0["Object"] 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
MsBuildBinaryLogFileFormat(ICakeContext) BaseMsBuildLogFileFormat
Gets an instance for the MsBuild binary log format.
static
MsBuildIssues(ICakeContext, MsBuildIssuesSettings) IIssueProvider
Gets an instance of a provider for issues reported as MsBuild warnings using specified settings.
static
MsBuildIssuesFromContent(ICakeContext, string, BaseMsBuildLogFileFormat) IIssueProvider
Gets an instance of a provider for issues reported as MsBuild warnings using log content.
static
MsBuildIssuesFromFilePath(ICakeContext, FilePath, BaseMsBuildLogFileFormat) IIssueProvider
Gets an instance of a provider for issues reported as MsBuild warnings using a log file from disk.
static
MsBuildIssuesProviderTypeName(ICakeContext) string
Gets the name of the MsBuild issue provider. This name can be used to identify issues based on the ProviderType property.
static
MsBuildXmlFileLoggerFormat(ICakeContext) BaseMsBuildLogFileFormat

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

Extension Methods

Name Value Summary
ToDictionary() IDictionary<string, object>
Requires the Cake.DeployParams addin