RazorDocs Search
API Reference

PackageIndex

Type

PackageIndexGenerator

Source

Generates and verifies the manifest-backed package chooser markdown for the repository.

Remarks

This generator is intentionally repository-aware. It expects the manifest, chooser sidecar, package README links, and release-surface links to resolve to files under the supplied repository root. Callers should validate repository layout drift through VerifyAsync in CI whenever package or docs paths change.

Method

GenerateToFileAsync

Task GenerateToFileAsync(PackageIndexRequest request, CancellationToken cancellationToken = default) Source

Generates chooser markdown and writes it to the configured output path.

Parameters

  • requestGeneration request describing the repository root, manifest path, and output path.
  • cancellationTokenCancellation token used for manifest loading, metadata evaluation, and file writes.

Returns

A task that completes when the chooser file has been written.

Exceptions

  • PackageIndexExceptionThrown when the repository layout is invalid, required docs are missing, or the manifest cannot be rendered safely.

Remarks

This method creates the output directory when it does not already exist and overwrites the chooser file atomically from the generated markdown payload.

Method

GenerateAsync

Task<string> GenerateAsync(PackageIndexRequest request, CancellationToken cancellationToken = default) Source

Generates chooser markdown from the manifest and evaluated project metadata without writing it to disk.

Parameters

  • requestGeneration request describing the repository root, manifest path, and output path context.
  • cancellationTokenCancellation token used while loading the manifest and project metadata.

Returns

The fully rendered chooser markdown.

Exceptions

  • PackageIndexExceptionThrown when repository layout, manifest content, or linked docs targets do not satisfy the chooser contract.
Method

VerifyAsync

Task VerifyAsync(PackageIndexRequest request, CancellationToken cancellationToken = default) Source

Verifies that the checked-in chooser file matches the current repository truth.

Parameters

  • requestVerification request describing the repository root, manifest path, and generated chooser file.
  • cancellationTokenCancellation token used while regenerating and reading the existing chooser file.

Returns

A task that completes when verification succeeds.

Exceptions

  • PackageIndexExceptionThrown when the generated chooser is missing or differs from the freshly generated markdown.
Method

RunPackageGateAsync

Task<PackageGateReport> RunPackageGateAsync(PackageIndexRequest request, CancellationToken cancellationToken = default) Source

Runs release-readiness checks that protect the package manifest from drifting away from publishable packages.

Parameters

  • requestGate request describing the repository root, manifest path, and generated chooser file.
  • cancellationTokenCancellation token used while evaluating package metadata and scanning files.

Returns

A report summarizing the package and source-file surfaces covered by the gate.

Exceptions

  • PackageIndexExceptionThrown when release metadata is missing, package class rules are violated, or stale brand strings remain.
Property

RepositoryPathComparison

StringComparison RepositoryPathComparison { get; } Source

Gets the path-comparison rule used when enforcing repository-boundary checks for chooser links.

Remarks

Windows paths are treated case-insensitively. Other platforms stay ordinal so chooser validation does not assume a case-insensitive filesystem on Linux or macOS.

Type

PackageIndexRequest

Source

Describes one package chooser generation or verification request.

Parameters

  • RepositoryRootAbsolute repository root that contains the manifest, docs, and project files.
  • ManifestPathAbsolute path to the chooser manifest file.
  • OutputPathAbsolute path to the generated chooser markdown file.
Type

ResolvedPackageEntry

Source

Couples one manifest row with the evaluated package metadata used to render the chooser.

Parameters

  • ManifestThe manifest row that provides classification, prose, and docs pointers.
  • MetadataThe evaluated project metadata that provides package identity and install details.
Type

PackageGateReport

Source

Summarizes the package gate coverage used by CI and local release checks.

Parameters

  • PackageCountNumber of manifest entries validated by package class and release metadata rules.
  • ScannedFileCountNumber of source files scanned for stale brand strings.
Type

PackageGateValidator

Source

Validates package release metadata, package-class invariants, and stale brand drift before packages are published.

Method

Validate

PackageGateReport Validate(string repositoryRoot, IReadOnlyList<ResolvedPackageEntry> entries) Source

Validates all gate rules against resolved package entries and repository files.

Parameters

  • repositoryRootAbsolute repository root to scan.
  • entriesResolved package entries from the chooser manifest.

Returns

A compact report describing gate coverage.

Type

PackageIndexException

Source

Represents a package chooser generation or verification failure.

Remarks

These exceptions are written directly to CLI stderr, so messages should stay actionable and user-facing.

Type

IProjectMetadataProvider

Source

Contract for evaluating one discovered project into package metadata suitable for chooser rendering.

Method

GetMetadataAsync

Task<PackageProjectMetadata> GetMetadataAsync(string repositoryRoot, string projectPath, CancellationToken cancellationToken) Source

Evaluates one project file and returns the package metadata used by the chooser.

Parameters

  • repositoryRootAbsolute repository root used as the evaluation working directory.
  • projectPathRepository-relative project path for the project being evaluated.
  • cancellationTokenCancellation token that should abort the evaluation when possible.

Returns

The evaluated project metadata for the supplied project.

Type

PackageProjectMetadata

Source

Evaluated package metadata used by the chooser renderer.

Parameters

  • ProjectPathRepository-relative path to the project that produced this metadata.
  • PackageIdNuGet package identifier emitted by the project.
  • TargetFrameworkResolved target framework summary used in chooser copy.
  • IsPackableWhether the project reports itself as packable.
  • IsToolWhether the project reports itself as a .NET tool package.
  • OutputTypeResolved output type, such as Library or Exe.
  • ProjectReferencesEvaluated project reference paths reported by MSBuild.
Property

InstallCommand

string InstallCommand { get; } Source

Gets the primary install command shown in the chooser for this package or tool.

Type

PackageProjectScanner

Source

Discovers candidate projects that should be classified by the package chooser manifest.

Remarks

The scanner intentionally excludes tests, examples, tooling, and generated directories so the manifest only needs to classify packages that are meaningful to external adopters or package-surface maintainers.

Method

DiscoverProjects

IReadOnlyList<string> DiscoverProjects(string repositoryRoot) Source

Enumerates candidate project files under the repository root.

Parameters

  • repositoryRootAbsolute repository root to scan.

Returns

Repository-relative project paths ordered for stable manifest validation.

Method

IsCandidateProject

bool IsCandidateProject(string relativePath) Source

Determines whether a repository-relative project path belongs in the chooser manifest.

Parameters

  • relativePathRepository-relative project path to evaluate.

Returns

true when the path should be classified by the chooser manifest; otherwise, false.

Type

DotNetProjectMetadataProvider

Source

Evaluates project metadata by invoking dotnet msbuild and reading JSON property output.

Remarks

This provider depends on a functioning local .NET SDK and assumes the project can be evaluated from the repository root. Timeouts and malformed output are surfaced as PackageIndexException so CLI callers can fail fast in CI.

Method

ParseMetadataJson

PackageProjectMetadata ParseMetadataJson(string projectPath, string standardOutput) Source

Parses one dotnet msbuild JSON payload into package metadata.

Parameters

  • projectPathRepository-relative project path used for error reporting.
  • standardOutputRaw JSON payload captured from dotnet msbuild.

Returns

The normalized package metadata derived from the JSON payload.

Exceptions

  • PackageIndexExceptionThrown when the JSON payload is malformed, missing required properties, or reports incomplete metadata.

Remarks

This parsing seam is intentionally internal so tests can verify malformed and incomplete metadata handling without depending on a real SDK invocation or using reflection against private helpers.

Type

PackageManifestLoader

Source

Loads the chooser manifest from YAML into strongly typed manifest models.

Method

LoadAsync

Task<PackageManifest> LoadAsync(string manifestPath, CancellationToken cancellationToken) Source

Reads and parses the chooser manifest file.

Parameters

  • manifestPathAbsolute path to the chooser manifest file.
  • cancellationTokenCancellation token used while reading the manifest from disk.

Returns

The parsed chooser manifest.

Exceptions

  • PackageIndexExceptionThrown when the manifest cannot be parsed or does not define any package rows.
Type

PackageManifest

Source

Root manifest model for the chooser YAML file.

Property

Packages

List<PackageManifestEntry> Packages { get; init; } Source

Gets the ordered manifest rows that describe each package, support surface, or excluded package entry.

Type

PackageManifestEntry

Source

One manifest row describing how a project should appear in the chooser.

Remarks

Public rows must define install guidance and docs pointers. Non-public rows must define Note because their rendered bullets rely on that prose to explain why they are visible but not recommended as first installs.

Property

Project

string Project { get; init; } Source

Gets the repository-relative project path classified by this manifest entry.

Property

Classification

PackageClassification Classification { get; init; } Source

Gets the chooser classification that controls which section renders the package.

Property

PublishDecision

PackagePublishDecision? PublishDecision { get; init; } Source

Gets the publish decision consumed by the prerelease package artifact workflow.

Property

PublishReason

string? PublishReason { get; init; } Source

Gets the required maintainer-facing reason for entries that are intentionally not published.

Property

Order

int Order { get; init; } Source

Gets the stable display order within the chooser section.

Property

UseWhen

string? UseWhen { get; init; } Source

Gets the adopter-focused “use when” guidance for public package rows.

Property

Includes

string? Includes { get; init; } Source

Gets the concise statement describing what the package includes for public rows.

Property

DoesNotInclude

string? DoesNotInclude { get; init; } Source

Gets the concise statement describing what the package intentionally does not include for public rows.

Property

StartHerePath

string? StartHerePath { get; init; } Source

Gets the repository-relative documentation file linked from this chooser row.

Property

StartHereLabel

string? StartHereLabel { get; init; } Source

Gets the optional chooser label used for the linked documentation target.

Property

RecipeSummary

string? RecipeSummary { get; init; } Source

Gets the optional recipe summary shown in the “Also building...” section.

Property

Note

string? Note { get; init; } Source

Gets the explanatory note rendered for non-public package rows.

Property

DependsOn

List<string> DependsOn { get; init; } Source

Gets the optional package ids that this row depends on for install guidance.

Property

ExpectedDependencyPackageIds

List<string> ExpectedDependencyPackageIds { get; init; } Source

Gets the exact package ids expected from project-reference dependencies in the produced package.

Property

ReleaseStatus

PackageReleaseStatus ReleaseStatus { get; init; } Source

Gets the release status expected by package-gate for this package classification.

Property

CommercialStatus

PackageCommercialStatus CommercialStatus { get; init; } Source

Gets whether this package row is part of the commercial-ready public surface.

Property

ReleaseNotesPath

string? ReleaseNotesPath { get; init; } Source

Gets the repository-relative release notes file that explains current readiness for this package.

Enum

PackageClassification

Source

Chooser section classifications for manifest entries.

Enum

PackagePublishDecision

Source

Publish decisions for package artifact verification and later prerelease publishing.

Enum

PackageReleaseStatus

Source

Release status values package-gate expects for each chooser classification.

Enum

PackageCommercialStatus

Source

Commercial readiness status values used by package-gate.

Type

PackageArtifactWorkflow

Source

Coordinates prerelease package artifact packing and validation without publishing to NuGet.

Method

RunAsync

Task<PackageArtifactValidationReport> RunAsync(PackageArtifactRequest request, CancellationToken cancellationToken = default) Source

Packs and validates prerelease package artifacts.

Parameters

  • requestArtifact workflow request.
  • cancellationTokenCancellation token propagated to external commands and file writes.

Returns

Successful validation report.

Type

PackageArtifactRequest

Source

Request for package artifact packing and validation.

Parameters

  • RepositoryRootAbsolute repository root.
  • ManifestPathAbsolute package manifest path.
  • ArtifactsOutputPathDirectory that receives produced .nupkg artifacts.
  • ReportPathMarkdown validation report path.
  • PackageVersionExact prerelease package version to pack and validate.
  • ArtifactManifestPathMachine-readable validation manifest path for the publish workflow.
Type

CliWrapCommandRunner

Source

Runs external commands through CliWrap for protected package publishing and smoke-install workflows.

Type

IExternalCommandRunner

Source

External command runner used by publish and smoke workflows when non-zero exit codes are meaningful results.

Method

RunAsync

Task<ExternalCommandResult> RunAsync(ExternalCommandRequest request, CancellationToken cancellationToken) Source

Runs a command and returns stdout, stderr, and exit code without throwing for non-zero exits.

Parameters

  • requestCommand request.
  • cancellationTokenCancellation token.

Returns

Captured command result.

Type

ExternalCommandRequest

Source

Command invocation for CliWrap-backed release automation.

Type

ExternalCommandResult

Source

Captured command result including non-zero exit codes.

Type

PackageArtifactManifestWriter

Source

Writes the machine-readable package artifact manifest consumed by protected publish jobs.

Method

WriteAsync

Task WriteAsync(PackageArtifactValidationReport report, string artifactsDirectory, string manifestPath, CancellationToken cancellationToken) Source

Writes a manifest that binds validated package ids to artifact file names and SHA-512 hashes.

Parameters

  • reportPackage artifact validation report.
  • artifactsDirectoryDirectory containing the validated package artifacts.
  • manifestPathDestination manifest path.
  • cancellationTokenCancellation token.
Type

PackageArtifactManifestReader

Source

Reads and validates the artifact manifest written by the package artifact verifier.

Method

ReadAsync

Task<PackageArtifactManifest> ReadAsync(string manifestPath, CancellationToken cancellationToken) Source

Reads a package artifact manifest from disk.

Parameters

  • manifestPathManifest path.
  • cancellationTokenCancellation token.

Returns

Validated artifact manifest.

Type

PackagePrereleasePublishWorkflow

Source

Publishes a validated prerelease package artifact set to NuGet in manifest order.

Method

RunAsync

Task<PackagePublishLedger> RunAsync(PackagePrereleasePublishRequest request, CancellationToken cancellationToken) Source

Publishes each artifact selected by the checked-in manifest and writes a markdown ledger.

Parameters

  • requestPublish request.
  • cancellationTokenCancellation token.

Returns

Publish ledger.

Type

PackageSmokeInstallWorkflow

Source

Restores published public packages from a clean NuGet configuration after publish completes.

Method

RunAsync

Task<PackageSmokeInstallReport> RunAsync(PackageSmokeInstallRequest request, CancellationToken cancellationToken) Source

Restores each public package from the configured package source in an isolated workspace.

Parameters

  • requestSmoke install request.
  • cancellationTokenCancellation token.

Returns

Smoke install report.

Type

PackagePublishLedgerRenderer

Source

Renders protected publish outcomes for workflow artifacts.

Type

PackageSmokeInstallReportRenderer

Source

Renders package smoke install outcomes for workflow artifacts.

Type

PackagePrereleasePublishRequest

Source

Request for the protected NuGet prerelease publish workflow.

Parameters

  • RepositoryRootRepository root used for plan resolution.
  • ManifestPathChecked-in package manifest path.
  • ArtifactsInputPathDirectory containing validated .nupkg files.
  • ArtifactManifestPathMachine-readable artifact manifest path.
  • PublishLogPathMarkdown publish ledger path.
  • SourceNuGet source URL.
  • ApiKeyEnvironmentVariableEnvironment variable that supplies the NuGet API key.
Type

PackageSmokeInstallRequest

Source

Request for the post-publish smoke install workflow.

Parameters

  • RepositoryRootRepository root used for path display and validation.
  • ManifestPathChecked-in package manifest path used to revalidate the artifact manifest.
  • ArtifactManifestPathMachine-readable artifact manifest path.
  • WorkDirectoryIsolated smoke install work directory.
  • ReportPathMarkdown smoke install report path.
  • SourceNuGet source URL.
Type

PackageArtifactManifest

Source

Machine-readable artifact manifest that binds validated package artifacts to immutable hashes.

Parameters

  • SchemaVersionManifest schema version.
  • PackageVersionExact prerelease package version.
  • GeneratedAtUtcUTC timestamp when the manifest was generated.
  • EntriesManifest entries in package publish order.
Type

PackageArtifactManifestEntry

Source

One package artifact selected from the checked-in package manifest.

Parameters

  • PackageIdNuGet package id.
  • ProjectPathRepository-relative project path.
  • DecisionPublish decision string from the package plan.
  • ArtifactFileNamePackage artifact file name without directory segments.
  • Sha512Lowercase hexadecimal SHA-512 hash of the package artifact.
  • IsToolWhether the artifact is a .NET tool package.
Type

PackagePublishLedger

Source

Publish result for a coordinated prerelease package version.

Parameters

  • PackageVersionExact prerelease package version.
  • SourceNuGet source URL.
  • EntriesPer-package publish outcomes.
Type

PackagePublishLedgerEntry

Source

Publish outcome for one package artifact.

Parameters

  • PackageIdNuGet package id.
  • ProjectPathRepository-relative project path.
  • ArtifactFileNamePackage artifact file name.
  • StatusPublish status.
  • ExitCodeExit code from dotnet nuget push, or zero for skipped packages.
  • OutputCaptured publish output with secrets excluded.
Type

PackageSmokeInstallReport

Source

Smoke install result for packages restored after prerelease publishing.

Parameters

  • PackageVersionExact prerelease package version.
  • SourceNuGet source URL.
  • EntriesPer-package smoke install outcomes.
Type

PackageSmokeInstallReportEntry

Source

Smoke install outcome for one public package.

Parameters

  • PackageIdNuGet package id.
  • ProjectPathRepository-relative project path.
  • IsToolWhether the package was installed as a .NET tool.
  • StatusSmoke install status.
  • ExitCodeExit code from the final restore or tool install attempt.
  • OutputCaptured install output.
Type

PackageHash

Source

Computes package artifact hashes for manifest generation and publish verification.

Type

PackageArtifactJson

Source

JSON serializer options shared by artifact manifest readers and writers.

Type

ReleaseEnvironment

Source

Environment variables that make release automation quieter and deterministic.

Type

PackagePublishDecisionFormatter

Source

Formats package publish decisions for machine-readable release artifacts.

Type

PackageArtifactManifestPlanValidator

Source

Verifies that an artifact manifest still matches the checked-in package plan and validated artifacts.

Type

PlannedPackageArtifact

Source

Package artifact that has been matched to both the checked-in plan and artifact manifest.

Parameters

  • ManifestEntryManifest entry for the artifact.
  • ArtifactPathResolved artifact path on disk.
Enum

PackagePublishStatus

Source

Publish status values written to the protected publish ledger.

Enum

PackageSmokeInstallStatus

Source

Smoke install status values written to the smoke report.

Type

PackagePublishPlanResolver

Source

Resolves the checked-in package manifest into the exact package set that should be packed.

Method

ResolveAsync

Task<PackagePublishPlan> ResolveAsync(string repositoryRoot, string manifestPath, CancellationToken cancellationToken) Source

Resolves and validates the package publish plan.

Parameters

  • repositoryRootAbsolute repository root.
  • manifestPathAbsolute path to the package manifest.
  • cancellationTokenCancellation token used while loading metadata.

Returns

The ordered package publish plan.

Type

PackagePublishPlan

Source

Ordered package set selected for artifact packing and validation.

Parameters

  • EntriesPackages that should be packed, in deterministic manifest order.
Type

PackagePublishPlanEntry

Source

One package selected for pack artifact production.

Parameters

  • ProjectPathRepository-relative project path to pack.
  • PackageIdExpected NuGet package id.
  • DecisionPublish decision from the manifest.
  • ExpectedDependencyPackageIdsExpected same-version package dependencies.
  • IsToolWhether the package is a .NET tool package.
Type

PackageArtifactValidator

Source

Validates prerelease package artifacts against the resolved publish plan.

Method

Validate

PackageArtifactValidationReport Validate(PackagePublishPlan plan, string artifactsDirectory, string packageVersion) Source

Validates the package output directory and returns a markdown-ready report.

Parameters

  • planResolved package publish plan.
  • artifactsDirectoryDirectory containing produced .nupkg files.
  • packageVersionExact package version expected in every artifact.

Returns

A validation report for the inspected artifacts.

Type

PackageArtifactReportRenderer

Source

Renders package artifact validation results for workflow artifacts.

Method

RenderMarkdown

string RenderMarkdown(PackageArtifactValidationReport report) Source

Renders the validation report as markdown.

Parameters

  • reportValidation report to render.

Returns

Markdown report content.

Type

PackageVersionValidator

Source

Ensures package versions used by the prerelease workflow are safe for NuGet identity.

Method

RequirePrerelease

void RequirePrerelease(string packageVersion) Source

Validates that the package version is a prerelease SemVer identity without build metadata.

Parameters

  • packageVersionPackage version to validate.
Type

PackageArtifactValidationReport

Source

Result of a successful package artifact validation run.

Parameters

  • PackageVersionExact package version inspected.
  • EntriesValidated package report rows.
Type

PackageArtifactValidationReportEntry

Source

One validated package row in the artifact report.

Parameters

  • PackageIdValidated package id.
  • ProjectPathProject that produced the package.
  • DecisionPublish decision from the manifest.
  • ExpectedDependencyPackageIdsExpected same-version package dependency ids.
  • ArtifactPathValidated .nupkg artifact path.
  • IsToolWhether the package is a .NET tool package.
Type

InspectedPackage

Source

Metadata and payload facts inspected from one NuGet package artifact.

Parameters

  • PackagePathAbsolute or caller-supplied path to the inspected .nupkg file.
  • PackageIdNuspec package id. Expected to be non-empty after inspection.
  • PackageVersionNuspec package version. Expected to be non-empty after inspection.
  • AuthorsNuspec authors metadata, or null when absent.
  • DescriptionNuspec description metadata, or null when absent.
  • LicenseNuspec license expression or value, or null when absent.
  • RepositoryUrlNuspec repository URL, or null when absent.
  • TagsNuspec package tags, or null when absent.
  • ReadmeNuspec README path, or null when absent.
  • PackageTypesDeclared nuspec package type names such as DotnetTool.
  • DependenciesDependency ids mapped to all distinct nuspec versions observed across dependency groups.
  • EntryPathsNormalized archive entry paths contained in the package.
  • FirstPartyAssemblyVersionsFirst-party implementation assemblies and their informational versions.
Type

InspectedAssemblyVersion

Source

Informational version metadata read from a first-party assembly inside a package artifact.

Parameters

  • EntryPathArchive path for the inspected assembly entry.
  • InformationalVersionAssembly informational version value read from metadata.
Type

ICommandRunner

Source

Runs external commands for repository validation workflows.

Method

RunAsync

Task<CommandRunResult> RunAsync(CommandRunRequest request, CancellationToken cancellationToken) Source

Runs the requested command and returns captured output when it exits successfully.

Parameters

  • requestCommand request with process, timeout, and user-facing error context.
  • cancellationTokenCancellation token used while waiting for command completion.

Returns

Captured process output.

Exceptions

  • PackageIndexExceptionThrown when the process fails to start, times out, or exits unsuccessfully.
Type

CommandRunRequest

Source

Describes one external command invocation and the language to use when it fails.

Parameters

  • FileNameExecutable name or path.
  • ArgumentsCommand-line arguments supplied without shell interpolation.
  • WorkingDirectoryWorking directory for the process.
  • OperationNameHuman-readable operation name, such as dotnet pack.
  • SubjectRepository item being processed, such as a project path.
  • FailureVerbVerb phrase used in nonzero exit messages, such as pack or evaluate.
  • TimeoutDescriptionGerund phrase used in timeout messages, such as packing.
  • TimeoutMillisecondsTimeout applied to the process wait.
  • EnvironmentOptional environment variable overrides.
Type

CommandRunResult

Source

Captured stdout and stderr from a successful command.

Parameters

  • StandardOutputCaptured standard output.
  • StandardErrorCaptured standard error.
Type

ProcessCommandRunner

Source

Process-backed command runner with timeout and failure cleanup.

Type

Program

Source

CLI entry point for generating or verifying the package chooser.

Method

Main

Task<int> Main(string[] args) Source

Launches the package chooser CLI with the current process IO streams and working directory.

Parameters

  • argsCommand-line arguments supplied to the process.

Returns

Process exit code where 0 indicates success.

Method

RunAsync

Task<int> RunAsync(string[] args, TextWriter standardOut, TextWriter standardError, string currentDirectory, CancellationToken cancellationToken = default, Func<PackageArtifactRequest, CancellationToken, Task<PackageArtifactValidationReport>>? verifyPackagesAsync = null, Func<PackagePrereleasePublishRequest, CancellationToken, Task<PackagePublishLedger>>? publishPrereleaseAsync = null, Func<PackageSmokeInstallRequest, CancellationToken, Task<PackageSmokeInstallReport>>? smokeInstallAsync = null) Source

Runs the package chooser CLI against the supplied IO streams and working directory.

Parameters

  • argsCommand-line arguments, including the command and optional path overrides. If any help argument is present, this method returns usage output before command or option parsing so help remains available from any working directory.
  • standardOutWriter that receives success messages and help/usage output.
  • standardErrorWriter that receives invalid invocation usage and failure messages.
  • currentDirectoryWorking directory used to resolve default repository-relative paths after help handling.
  • cancellationTokenCancellation token propagated to generator operations.
  • verifyPackagesAsyncOptional package artifact workflow override used by tests.
  • publishPrereleaseAsyncOptional prerelease publish workflow override used by tests.
  • smokeInstallAsyncOptional smoke install workflow override used by tests.

Returns

0 when the command succeeds; otherwise a non-zero exit code.

Type

CommandLineOptions

Source

Parsed CLI options for one package chooser command invocation.

Parameters

  • RequestResolved package chooser request derived from command-line options.
  • ArtifactsOutputPathResolved package artifact output directory.
  • ReportPathResolved package artifact validation report path.
  • PackageVersionOptional package version supplied for package artifact verification.
  • ArtifactsInputPathResolved package artifact input directory for protected publish jobs.
  • ArtifactManifestPathResolved machine-readable package artifact manifest path.
  • PublishLogPathResolved protected publish ledger path.
  • SourceNuGet source URL used for publish and smoke install.
  • ApiKeyEnvironmentVariableEnvironment variable name that supplies the NuGet API key.
  • SmokeWorkDirectoryResolved isolated smoke install work directory.
  • SmokeReportPathResolved smoke install report path.
Method

Parse

CommandLineOptions Parse(string[] args, string currentDirectory) Source

Parses path-related CLI options into a resolved chooser request.

Parameters

  • argsArguments after the command verb.
  • currentDirectoryWorking directory used to resolve relative overrides.

Returns

The parsed command-line options.

Exceptions

  • PackageIndexExceptionThrown when an option is unknown or missing its required value.
Method

CreatePackageArtifactRequest

PackageArtifactRequest CreatePackageArtifactRequest() Source

Converts parsed CLI options into a package artifact request.

Returns

The package artifact request.

Exceptions

  • PackageIndexExceptionThrown when the required package version is missing.
Method

CreatePackagePrereleasePublishRequest

PackagePrereleasePublishRequest CreatePackagePrereleasePublishRequest() Source

Converts parsed CLI options into a protected prerelease publish request.

Returns

The prerelease publish request.

Method

CreatePackageSmokeInstallRequest

PackageSmokeInstallRequest CreatePackageSmokeInstallRequest() Source

Converts parsed CLI options into a package smoke install request.

Returns

The package smoke install request.