Table of Contents

Class DotNetBuildOptionsCommand

Namespace
DotNetDo
Assembly
DotNetDo.Core.dll

Shares build configuration, restore, runtime, output, and build-server behavior across build and pack.

public abstract record DotNetBuildOptionsCommand : DotNetTargetCommand, IEquatable<ExecOptions>, IEquatable<ToolCommand>, IEquatable<ToolCommand<ExecResult>>, IEquatable<ExecToolCommand>, IEquatable<DotNetTargetCommand>, IEquatable<DotNetBuildOptionsCommand>

Inheritance

Derived

Implements

Constructors

DotNetBuildOptionsCommand()

Creates a command with defaults for the current build locality.

protected DotNetBuildOptionsCommand()

Properties

ArtifactsPath

Places outputs for all projects beneath this artifacts root, separated by project.

public string? ArtifactsPath { get; init; }

Property Value

string?

AssemblyVersion

The version stored in the produced assembly manifest.

public string? AssemblyVersion { get; init; }

Property Value

string?

BuildParts

Places shared target and build behavior before operation-specific arguments.

protected IReadOnlyList<string?> BuildParts { get; }

Property Value

IReadOnlyList<string?>

Configuration

The build configuration; defaults to Debug locally and Release in CI.

public string? Configuration { get; init; }

Property Value

string?

ContinuousIntegrationBuild

Marks outputs as produced by a continuous-integration build; defaults to enabled outside local builds.

public bool? ContinuousIntegrationBuild { get; init; }

Property Value

bool?

The copyright notice applied to produced packages and assemblies.

public string? Copyright { get; init; }

Property Value

string?

CurrentRuntime

Uses the current runtime as the target runtime instead of resolving one from the project.

public bool CurrentRuntime { get; init; }

Property Value

bool

DisableBuildServers

Prevents reuse of persistent build servers during this invocation.

public bool DisableBuildServers { get; init; }

Property Value

bool

FileVersion

The version stored in the produced file metadata.

public string? FileVersion { get; init; }

Property Value

string?

InformationalVersion

The informational version stored in the produced assembly.

public string? InformationalVersion { get; init; }

Property Value

string?

Interactive

Allows authentication and other restore operations to prompt for input.

public bool Interactive { get; init; }

Property Value

bool

Suppresses the startup banner and copyright message.

public bool NoLogo { get; init; }

Property Value

bool

NoRestore

Skips implicit restore; assets must already be current.

public bool NoRestore { get; init; }

Property Value

bool

Output

Places all build outputs in this directory instead of project-defined locations.

public string? Output { get; init; }

Property Value

string?

PackageVersion

The package version produced by the build.

public string? PackageVersion { get; init; }

Property Value

string?

Properties

Additional MSBuild properties. Values are escaped for MSBuild property-switch syntax.

public IReadOnlyDictionary<string, string> Properties { get; init; }

Property Value

IReadOnlyDictionary<string, string>

Runtime

The target runtime identifier, such as win-x64.

public string? Runtime { get; init; }

Property Value

string?

VersionPrefix

The first part of the build version.

public string? VersionPrefix { get; init; }

Property Value

string?

VersionSuffix

Replaces the project's version suffix when forming the build version.

public string? VersionSuffix { get; init; }

Property Value

string?

Methods

MSBuildPropertyParts(string?, bool, params (string Name, object? Value)[])

Renders common and additional MSBuild properties after checking typed-property collisions.

protected IReadOnlyList<string?> MSBuildPropertyParts(string? version, bool renderVersion, params (string Name, object? Value)[] commandProperties)

Parameters

version string?
renderVersion bool
commandProperties (string Name, object? Value)[]

Returns

IReadOnlyList<string?>