Class SetupDotnetStep
Represents a workflow step that sets up a specific .NET SDK version.
public sealed record SetupDotnetStep : IAdditionalStepOption, IBuildOption
- Inheritance
-
objectSetupDotnetStep
- Implements
Constructors
SetupDotnetStep(Template?, DotnetQuality?, bool, string?)
Represents a workflow step that sets up a specific .NET SDK version.
public SetupDotnetStep(Template? DotnetVersion = null, SetupDotnetStep.DotnetQuality? Quality = null, bool Cache = false, string? LockFile = null)
Parameters
DotnetVersionTemplateThe .NET SDK version to install (e.g., "6.0.x"). If null, the environment's default version is used.
QualitySetupDotnetStep.DotnetQuality?The quality of the .NET SDK to install (e.g., Preview, GA). If null, the default quality is used. GitHub workflows support only Daily, Preview and Ga; generating one with Signed or Validated throws.
CacheboolWhether to cache the installed .NET SDK.
LockFilestringThe path to the project's lock file (e.g., "**/packages.lock.json")
Properties
Cache
Whether to cache the installed .NET SDK.
public bool Cache { get; init; }
Property Value
- bool
DotnetVersion
The .NET SDK version to install (e.g., "6.0.x"). If null, the environment's default version is used.
public Template? DotnetVersion { get; init; }
Property Value
- Template
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
LockFile
The path to the project's lock file (e.g., "**/packages.lock.json")
public string? LockFile { get; init; }
Property Value
- string
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
Quality
The quality of the .NET SDK to install (e.g., Preview, GA). If null, the default quality is used. GitHub workflows support only Daily, Preview and Ga; generating one with Signed or Validated throws.
public SetupDotnetStep.DotnetQuality? Quality { get; init; }