Class AddNugetFeedsStep
A custom workflow step that configures NuGet feeds on a build agent by adding them to the nuget.config file.
public sealed record AddNugetFeedsStep : IAdditionalStepOption, IBuildOption
- Inheritance
-
objectAddNugetFeedsStep
- Implements
Remarks
Attach this step to a job definition to ensure that the specified NuGet feeds are available before the main job tasks run.
Constructors
AddNugetFeedsStep()
public AddNugetFeedsStep()
Properties
Enabled
Indicates whether the step is enabled. When set to true, the step is processed as part of the workflow; otherwise, it is ignored.
public bool Enabled { get; init; }
Property Value
- bool
FeedsToAdd
Gets the list of NuGet feeds to be added to the build agent's configuration.
public IReadOnlyList<NugetFeedOptions> FeedsToAdd { get; init; }
Property Value
- IReadOnlyList<NugetFeedOptions>
Order
The order that the step should be executed within the job. Values less than 0 are run before the target, and values greater than 0 are run after the target. A value of 0 is invalid.
public int Order { get; init; }
Property Value
- int
SyncAtomToolVersionToLibraryVersion
Gets a value indicating whether the Atom tool version installed on the agent should be kept in
sync with the referenced Atom library version. Defaults to true.
public bool SyncAtomToolVersionToLibraryVersion { get; init; }
Property Value
- bool
Methods
GetEnvVarNameForFeed(string)
Generates a standardized environment variable name for a given NuGet feed's authentication token.
public static string GetEnvVarNameForFeed(string feedName)
Parameters
feedNamestringThe name of the NuGet feed.
Returns
- string
The conventional environment variable name for the feed's token (e.g., "NUGET_TOKEN_MY_FEED").