DotNetMSBuildSettings Class

Summary

Contains settings used by DotNetMSBuildBuilder.
graph BT Type-->Base0["DotNetSettings"] click Base0 "/api/Cake.Common.Tools.DotNet/DotNetSettings" Base0-->Base1["ToolSettings"] click Base1 "/api/Cake.Core.Tooling/ToolSettings" Base1-->Base2["object"] Type["DotNetMSBuildSettings"] class Type type-node

Syntax

public class DotNetMSBuildSettings : DotNetSettings

Constructors

Name Summary
DotNetMSBuildSettings() Initializes a new instance of the DotNetMSBuildSettings class.

Properties

Name Value Summary
ArgumentCustomization Func<ProcessArgumentBuilder, ProcessArgumentBuilder>
Gets or sets the argument customization. Argument customization is a way that lets you add, replace or reuse arguments passed to a tool. This allows you to support new tool arguments, customize arguments or address potential argument issues.
Inherited from ToolSettings
AssemblyVersion string
Gets or sets the assembly version number embedded in the build output.
BinaryLogger MSBuildBinaryLoggerSettings
Gets or sets the binary logging options.
ConsoleLoggerSettings MSBuildLoggerSettings
Gets or sets the parameters for the console logger.
ContinuousIntegrationBuild bool?
Gets or sets a value indicating whether to normalize stored file paths used when producing deterministic builds.
DetailedSummary bool
Gets or sets a value indicating whether to show detailed information at the end of the build log about the configurations that were built and how they were scheduled to nodes.
DiagnosticOutput bool
Gets or sets a value indicating whether to not enable diagnostic output.
Inherited from DotNetSettings
DisableConsoleLogger bool
Gets or sets a value indicating whether to disable the default console logger, and not log events to the console.
DistributedFileLogger bool
Gets or sets a value indicating whether to log the build output of each MSBuild node to its own file.
DistributedLoggers ICollection<MSBuildDistributedLogger>
Gets the distributed loggers to use.
EnvironmentVariables IDictionary<string, string>
Gets or sets search paths for files, directories for temporary files, application-specific options, and other similar information.
Inherited from ToolSettings
ExcludeAutoResponseFiles bool
Gets or sets a value indicating whether to exclude any MSBuild.rsp files automatically.
FileLoggers ICollection<MSBuildFileLoggerSettings>
Gets the file loggers to use.
FileVersion string
Gets or sets the file version number embedded in the build output.
HandleExitCode Func<int, bool>
Gets or sets whether the exit code from the tool process causes an exception to be thrown.

If the delegate is null (the default) or returns false, then an exception is thrown upon a non-zero exit code.

If the delegate returns true then no exception is thrown.

This can be useful when the exit code should be ignored, or if there is a desire to apply logic that is conditional on the exit code value.

Inherited from ToolSettings
IgnoreProjectExtensions ICollection<string>
Gets or sets extensions to ignore when determining which project file to build.
InformationalVersion string
Gets or sets the assembly informational version number embedded in the build output.
Loggers ICollection<MSBuildLogger>
Gets the loggers to use to log events from MSBuild.
MaxCpuCount int?
Gets or sets the maximum number of concurrent processes to use when building.
NodeReuse bool?
Gets or sets a value indicating whether or not node reuse is used. When you’re doing multiple builds in a row, this helps reduce your total build time, by avoiding the start up costs of each MSBuild child node.
NoLogo bool
Gets or sets a value indicating whether to display the startup banner and the copyright message.
NoWorkingDirectory bool
Gets or sets a value indicating whether or not to opt out of using an explicit working directory for the process.
Inherited from ToolSettings
PackageReleaseNotes string
Gets or sets the release notes of the NuGet package generated.
PackageVersion string
Gets or sets the version number of the NuGet package generated.
PostAction Action<IProcess>
Gets or sets a delegate which is executed after the process was started.
Inherited from ToolSettings
Properties IDictionary<string, ICollection<string>>
Gets the project-level properties to set or override.
ResponseFiles ICollection<FilePath>
Gets the response files to use.
RollForward DotNetRollForward?
Gets or sets the dotnet roll forward policy.
Inherited from DotNetSettings
SetupProcessSettings Action<ProcessSettings>
Gets or sets a delegate to configure the process settings.
Inherited from ToolSettings
Targets ICollection<string>
Gets the targets to build in the project.
ToolPath FilePath
Gets or sets the tool path.
Inherited from ToolSettings
ToolTimeout TimeSpan?
Gets or sets optional timeout for tool execution.
Inherited from ToolSettings
ToolVersion MSBuildVersion?
Gets or sets the version of the Toolset to use to build the project.
TreatAllWarningsAs MSBuildTreatAllWarningsAs
Gets or sets a value indicating how all warnings should be treated.
ValidateProjectFile bool
Gets or sets a value indicating whether to validate the project file and, if validation succeeds, build the project.
Verbosity DotNetVerbosity?
Gets or sets the verbosity of logging to use.
Inherited from DotNetSettings
Version string
Gets or sets the default value of all the version numbers embedded in the build output.
VersionPrefix string
Gets or sets the base version number embedded in the build output.
VersionSuffix string
Gets or sets the pre-release label of the version number embedded in the build output.
WarningCodesAsError IList<string>
Gets the warning codes to treats as errors.
WarningCodesAsMessage IList<string>
Gets the warning codes to treats as low importance messages.
WorkingDirectory DirectoryPath
Gets or sets the working directory for the tool process.
Inherited from ToolSettings

Extension Methods

Name Value Summary
AddFileLogger(MSBuildFileLoggerSettings) DotNetMSBuildSettings
Adds a file logger.
AddFileLogger() DotNetMSBuildSettings
Adds a file logger with all the default settings.
DisableConsoleLogger() DotNetMSBuildSettings
Disables the default console logger, and not log events to the console.
Dump<DotNetMSBuildSettings>() string
Get a basic string representation of specified object.
Requires the Cake.Incubator addin
EnableBinaryLogger(MSBuildBinaryLoggerImports) DotNetMSBuildSettings
Enables the binary logger with the specified imports and default file name.
EnableBinaryLogger(string, MSBuildBinaryLoggerImports) DotNetMSBuildSettings
Enables the binary logger with the specified log file name and imports.
EnableBinaryLogger(string) DotNetMSBuildSettings
Enables the binary logger with the specified log file name and no imports.
EnableBinaryLogger() DotNetMSBuildSettings
Enables the binary logger with all the default settings.
ExcludeAutoResponseFiles() DotNetMSBuildSettings
Exclude any MSBuild.rsp files automatically.
HideLogo() DotNetMSBuildSettings
Hide the startup banner and the copyright message.
IsIn<DotNetMSBuildSettings>(DotNetMSBuildSettings[]) bool
Checks if the source is contained in a list
Requires the Cake.Incubator addin
NotNull<DotNetMSBuildSettings>(string) void
Throws an exception if the specified parameter's value is null.
Requires the Cake.Ftp addin
NotNull<DotNetMSBuildSettings>(string) void
Throws an exception if the specified parameter's value is null.
Requires the Cake.Issues addin
SetAssemblyVersion(string) DotNetMSBuildSettings
Sets the assembly version.
SetConfiguration(string) DotNetMSBuildSettings
Sets the configuration.
SetConsoleLoggerSettings(MSBuildLoggerSettings) DotNetMSBuildSettings
Sets the parameters for the console logger.
SetContinuousIntegrationBuild(bool?) DotNetMSBuildSettings
Sets a value indicating whether to normalize stored file paths used when producing deterministic builds.
SetFileVersion(string) DotNetMSBuildSettings
Sets the file version.
SetInformationalVersion(string) DotNetMSBuildSettings
Sets the informational version.
SetMaxCpuCount(int?) DotNetMSBuildSettings
Sets the maximum CPU count. Without this set MSBuild will compile projects in this solution one at a time.
SetNodeReuse(bool) DotNetMSBuildSettings
Sets whether or not node reuse should be enabled.
SetPackageReleaseNotes(string) DotNetMSBuildSettings
Sets the package release notes.
SetPackageVersion(string) DotNetMSBuildSettings
Sets the package version.
SetRuntime(string) DotNetMSBuildSettings
Sets a target operating systems where the application or assembly will run.
SetTargetFramework(string) DotNetMSBuildSettings
Adds a framework to target.
SetVersion(string) DotNetMSBuildSettings
Sets the version.
SetVersionPrefix(string) DotNetMSBuildSettings
Sets the version prefix.
SetVersionSuffix(string) DotNetMSBuildSettings
Sets the version Suffix.
SetWarningCodeAsError(string) DotNetMSBuildSettings
Sets the warning code to treats as an error.
SetWarningCodeAsMessage(string) DotNetMSBuildSettings
Sets the warning code to treats as a message.
ShowDetailedSummary() DotNetMSBuildSettings
Shows detailed information at the end of the build log about the configurations that were built and how they were scheduled to nodes.
SuppressVersionRecommendedFormatWarning() DotNetMSBuildSettings
Suppress warning CS7035. This is useful when using semantic versioning and either the file or informational version doesn't match the recommended format. The recommended format is: major.minor.build.revision where each is an integer between 0 and 65534 (inclusive).
ThrowIfNull<DotNetMSBuildSettings>(string, string) T
Throws a System.ArgumentNullException with a specific message if the value is null, otherwise returns the value
Requires the Cake.Incubator addin
ThrowIfNull<DotNetMSBuildSettings>(string) T
Throws a System.ArgumentNullException if the value is null, otherwise returns the value
Requires the Cake.Incubator addin
ToDictionary() IDictionary<string, object>
Requires the Cake.DeployParams addin
TreatAllWarningsAs(MSBuildTreatAllWarningsAs) DotNetMSBuildSettings
Sets how all warnings should be treated.
UseDistributedFileLogger() DotNetMSBuildSettings
Log the build output of each MSBuild node to its own file.
UseToolVersion(MSBuildVersion) DotNetMSBuildSettings
Sets the version of the Toolset to use to build the project.
ValidateProjectFile() DotNetMSBuildSettings
Validate the project file and, if validation succeeds, build the project.
WithArgumentCustomization<DotNetMSBuildSettings>(Func<ProcessArgumentBuilder, ProcessArgumentBuilder>) T
Sets the tool argument customization delegate.
WithDistributedLogger(MSBuildDistributedLogger) DotNetMSBuildSettings
Adds a distributed loggers to use.
WithEnvironmentVariable<DotNetMSBuildSettings>(string, string) T
Sets or adds tool environment variable.
WithExpectedExitCode<DotNetMSBuildSettings>(int) T
Sets expected exit code using WithHandleExitCode<T>(T, Func<int, bool>).
WithHandleExitCode<DotNetMSBuildSettings>(Func<int, bool>) T
Sets delegate whether the exit code from the tool process causes an exception to be thrown.
WithIgnoredProjectExtension(string) DotNetMSBuildSettings
Adds a extension to ignore when determining which project file to build.
WithLogger(string, string, string) DotNetMSBuildSettings
Adds a custom logger.
WithNoWorkingDirectory<DotNetMSBuildSettings>(bool) T
Sets whether the tool should use a working directory or not.
WithPostAction<DotNetMSBuildSettings>(Action<IProcess>) T
Sets a delegate which is executed after the tool process was started.
WithProperty(string, string[]) DotNetMSBuildSettings
Adds a property to the configuration.
WithResponseFile(FilePath) DotNetMSBuildSettings
Adds a response file to use.
WithSetupProcessSettings<DotNetMSBuildSettings>(Action<ProcessSettings>) T
Sets a delegate to configure the process settings.
WithTarget(string) DotNetMSBuildSettings
Adds a MSBuild target to the configuration.
WithToolPath<DotNetMSBuildSettings>(FilePath) T
Sets the tool path.
WithToolSettings<DotNetMSBuildSettings>(Action<DotNetMSBuildSettings>) T
Provides fluent null guarded tool settings action.
WithToolTimeout<DotNetMSBuildSettings>(TimeSpan) T
Sets the tool timeout.
WithWorkingDirectory<DotNetMSBuildSettings>(DirectoryPath) T
Sets the tool working directory.