Table of Contents

Class NugetOperations

Namespace
Ando.Operations
Assembly
ando.dll

Provides NuGet package operations for build scripts. Methods register steps in the workflow rather than executing immediately.

public class NugetOperations : OperationsBase
Inheritance
NugetOperations
Inherited Members

Constructors

NugetOperations(StepRegistry, IBuildLogger, Func<ICommandExecutor>)

public NugetOperations(StepRegistry registry, IBuildLogger logger, Func<ICommandExecutor> executorFactory)

Parameters

registry StepRegistry
logger IBuildLogger
executorFactory Func<ICommandExecutor>

Methods

EnsureAuthenticated()

Ensures NuGet API key is available for publishing. If NUGET_API_KEY environment variable is not set, prompts the user interactively. Call this before Push operations.

public void EnsureAuthenticated()

Pack(ProjectRef, Action<NugetPackOptions>?)

Registers a 'dotnet pack' step to create a NuGet package.

public void Pack(ProjectRef project, Action<NugetPackOptions>? configure = null)

Parameters

project ProjectRef

The project to pack.

configure Action<NugetPackOptions>

Optional configuration for pack options.

Push(ProjectRef, Action<NugetPushOptions>?)

Registers a 'dotnet nuget push' step to publish packages for a project. Looks for *.nupkg files in the project's output directory. Call EnsureAuthenticated() first to set up the API key.

public void Push(ProjectRef project, Action<NugetPushOptions>? configure = null)

Parameters

project ProjectRef

The project whose packages to push.

configure Action<NugetPushOptions>

Optional configuration for push options.

Push(string, Action<NugetPushOptions>?)

Registers a 'dotnet nuget push' step to publish a NuGet package. Call EnsureAuthenticated() first to set up the API key.

public void Push(string packagePath, Action<NugetPushOptions>? configure = null)

Parameters

packagePath string

Path to the .nupkg file or glob pattern (e.g., *.nupkg).

configure Action<NugetPushOptions>

Optional configuration for push options.