Table of Contents

Class NuGetPack

Namespace
DotNetDo
Assembly
DotNetDo.Core.dll

Creates a NuGet package from a specification or legacy project.

public sealed record NuGetPack : NuGetConfiguredCommand, IEquatable<ExecOptions>, IEquatable<ToolCommand>, IEquatable<ToolCommand<ExecResult>>, IEquatable<ExecToolCommand>, IEquatable<NuGetCommand>, IEquatable<NuGetConfiguredCommand>, IEquatable<NuGetPack>

Inheritance

Implements

Properties

BasePath

The base directory used to resolve files declared by the package specification.

public AbsolutePath? BasePath { get; init; }

Property Value

AbsolutePath?

Build

Builds the project before packing it.

public bool Build { get; init; }

Property Value

bool

CommandParts

Gets every canonically ordered rendered command fragment.

protected override IReadOnlyList<string?> CommandParts { get; }

Property Value

IReadOnlyList<string?>

Deterministic

Produces a package with deterministic timestamps and metadata.

public bool Deterministic { get; init; }

Property Value

bool

DeterministicTimestamp

The timestamp written when deterministic packing is enabled.

public DateTimeOffset? DeterministicTimestamp { get; init; }

Property Value

DateTimeOffset?

Exclude

Wildcard patterns for files omitted from the package.

public IReadOnlyList<string> Exclude { get; init; }

Property Value

IReadOnlyList<string>

ExcludeEmptyDirectories

Omits empty directories from the package.

public bool ExcludeEmptyDirectories { get; init; }

Property Value

bool

IncludeReferencedProjects

Includes referenced projects as dependencies or package contents.

public bool IncludeReferencedProjects { get; init; }

Property Value

bool

InputPath

The .nuspec or legacy project file to pack.

public AbsolutePath? InputPath { get; init; }

Property Value

AbsolutePath?

InstallPackageToOutputPath

Installs the produced package into the output directory.

public bool InstallPackageToOutputPath { get; init; }

Property Value

bool

MinClientVersion

The minimum NuGet client version required to install the package.

public string? MinClientVersion { get; init; }

Property Value

string?

MSBuildPath

The directory containing the MSBuild executable to use.

public AbsolutePath? MSBuildPath { get; init; }

Property Value

AbsolutePath?

MSBuildVersion

The MSBuild version to use when locating MSBuild.

public string? MSBuildVersion { get; init; }

Property Value

string?

NoDefaultExcludes

Includes files normally excluded by NuGet defaults.

public bool NoDefaultExcludes { get; init; }

Property Value

bool

NoPackageAnalysis

Skips package analysis after packing.

public bool NoPackageAnalysis { get; init; }

Property Value

bool

OutputDirectory

The directory that receives command output.

public AbsolutePath? OutputDirectory { get; init; }

Property Value

AbsolutePath?

OutputFileNamesWithoutVersion

Omits the version from generated package filenames.

public bool OutputFileNamesWithoutVersion { get; init; }

Property Value

bool

PackagesDirectory

The packages directory used to resolve referenced projects.

public AbsolutePath? PackagesDirectory { get; init; }

Property Value

AbsolutePath?

Properties

MSBuild properties passed to the pack operation. Null values render as empty values.

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

Property Value

IReadOnlyDictionary<string, string?>

SolutionDirectory

The solution directory used to resolve packages and repository metadata.

public AbsolutePath? SolutionDirectory { get; init; }

Property Value

AbsolutePath?

Suffix

The suffix appended to the package version.

public string? Suffix { get; init; }

Property Value

string?

SymbolPackageFormat

The format used for the symbols package.

public NuGetSymbolPackageFormat? SymbolPackageFormat { get; init; }

Property Value

NuGetSymbolPackageFormat?

Symbols

Creates a symbols package alongside the main package.

public bool Symbols { get; init; }

Property Value

bool

Tool

Creates a package intended for the legacy tools folder convention.

public bool Tool { get; init; }

Property Value

bool

Version

The package version.

public string? Version { get; init; }

Property Value

string?