BaseBuild Class
Definition
The base Nuke build class.
[ShutdownDotNetAfterServerBuild]public abstract class BaseBuild : NukeBuild, IHasConfiguration, IHasPlatform, IHasTargetFramework, ILint, IPack, IPublish, IReportCoverage, ITest, ICompile, IHasGitVersion, IHasArtifacts, IUpdatePackages, IListOutdatedPackages, IRestore, INukeBuild, IHasSolutionInheritance object → Nuke.Common.NukeBuild
Implements IHasConfiguration, IHasPlatform, IHasTargetFramework, ILint, IPack, IPublish, IReportCoverage, ITest, ICompile, IHasGitVersion, IHasArtifacts, IUpdatePackages, IListOutdatedPackages, IRestore, Nuke.Common.INukeBuild, IHasSolution
Constructors
BaseBuild(bool)
Initializes a new instance of the BaseBuild class.
public BaseBuild(bool disableConfigurationCheck = false)Parameters
disableConfigurationCheck bool
Whether to validate generated configuration files.
Properties
RunLintInCI
Gets or sets a value indicating whether lint source code in CI builds.
[Parameter("Whether to lint source code in CI builds")]public bool RunLintInCI { get; set; }RunPackInCD
Gets or sets a value indicating whether publish NuGet artifacts in CD builds.
[Parameter("Whether to publish NuGet artifacts in CD builds")]public bool RunPackInCD { get; set; }RunPublishInCD
Gets or sets a value indicating whether publish binary artifacts in CD builds.
[Parameter("Whether to publish binary artifacts in CD builds")]public bool RunPublishInCD { get; set; }Configuration
Gets or sets the configuration to build.
[Parameter("Configuration to build - 'Debug' (default for local build) or 'Release' (default for server)")]public Configuration Configuration { get; set; }Platform
Gets or sets the platform to build.
[Parameter("Platform to build - default depends on the solution")]public string? Platform { get; set; }Solution
Gets or sets the solution to build.
[Solution(SuppressBuildProjectCheck = true)]public Solution? Solution { get; set; }TargetFramework
Gets or sets the .NET target framework to use.
[Parameter(".NET target framework to use - default depends on the solution")]public string? TargetFramework { get; set; }ArtifactsDirectory
Gets or sets the output folder for artifacts.
[Parameter("Output folder for artifacts")]public AbsolutePath? ArtifactsDirectory { get; set; }CodeCoverageDirectory
Gets or sets the output folder for code coverage.
[Parameter("Output folder for code coverage")]public AbsolutePath? CodeCoverageDirectory { get; set; }NuGetDirectory
Gets or sets the output folder for NuGet packages.
[Parameter("Output folder for NuGet packages")]public AbsolutePath? NuGetDirectory { get; set; }PublishDirectory
Gets or sets the output folder for binaries.
[Parameter("Output folder for binaries")]public AbsolutePath? PublishDirectory { get; set; }TestResultDirectory
Gets or sets the output folder for test results.
[Parameter("Output folder for test results")]public AbsolutePath? TestResultDirectory { get; set; }PublishFrameworks
Gets or sets the .NET target framework to publish.
[Parameter(".NET target framework to publish - default depends on the solution")]public string[]? PublishFrameworks { get; set; }PublishProjects
Gets or sets the .NET projects to publish.
[Parameter(".NET projects to publish - default is the solution")]public string[]? PublishProjects { get; set; }ZipPublishOutput
Gets or sets a value indicating whether to create ZIP file of each published directory.
[Parameter("Whether to create ZIP file of each published directory")]public bool ZipPublishOutput { get; set; }ValidatePublishOutput
Gets or sets a mapping from project name to its expected publish output.
[Parameter("A mapping from project name to its expected publish output.")]public string[]? ValidatePublishOutput { get; set; }TestFilter
Gets or sets the filter for which tests to run.
[Parameter("Filter for which tests to run")]public string? TestFilter { get; set; }TestCollect
Gets or sets the data collector to use for the test run.
[Parameter("Data collector to use for the test run")]public string? TestCollect { get; set; }PublishCoverageHTML
Gets or sets a value indicating whether to publish HTML to view test coverage.
[Parameter("Whether to publish HTML to view test coverage")]public bool PublishCoverageHTML { get; set; }AddFeatureBranchNameToVersion
Gets or sets a value indicating whether to add the feature branch name to NuGet package versions.
[Parameter("Whether to add the feature branch name to NuGet package versions")]public bool AddFeatureBranchNameToVersion { get; set; }AddGitVersioning
Gets or sets a value indicating whether to add Nerdbank Git versioning metadata.
[Parameter("Whether to add Nerdbank Git versioning metadata")]public bool AddGitVersioning { get; set; }CentralPackagesFile
Gets or sets the central NuGet packages file location.
[Parameter("The central NuGet packages file location")]public AbsolutePath? CentralPackagesFile { get; set; }Interactive
Gets or sets a value indicating whether to interactively update packages.
[Parameter("Whether to interactively update packages")]public bool Interactive { get; set; }PinnedPackages
Gets or sets the package IDs to skip updating dependencies.
[Parameter("The package IDs to skip updating dependencies")]public string[]? PinnedPackages { get; set; }CI
Gets the target to run continuous integration.
protected Target CI { get; }CD
Gets the target to run continuous deployment.
protected Target CD { get; }Full
Gets the default target to run the full build.
protected virtual Target Full { get; }CreateBinLog
Gets the target to create a binary compilation log file.
protected Target CreateBinLog { get; }Methods
RunCI()
Runs continuous integration.
protected virtual void RunCI()RunCD()
Runs continuous deployment.
protected virtual void RunCD()RunCreateBinLog()
Creates a binary compilation log file.
protected virtual void RunCreateBinLog()