Class NugetPackOptions
- Namespace
- Ando.Operations
- Assembly
- ando.dll
Fluent builder for configuring 'dotnet pack' command options. Methods return 'this' for chaining.
public class NugetPackOptions
- Inheritance
-
NugetPackOptions
- Inherited Members
Properties
Configuration
Build configuration (Debug or Release).
public Configuration? Configuration { get; }
Property Value
IncludeSource
Include source files in the symbol package.
public bool IncludeSource { get; }
Property Value
IncludeSymbols
Include symbol package (.snupkg) for debugging.
public bool IncludeSymbols { get; }
Property Value
NoBuild
Skip build before packing (uses existing build output).
public bool NoBuild { get; }
Property Value
NoRestore
Skip package restore before packing.
public bool NoRestore { get; }
Property Value
OutputPath
Output directory for the generated package.
public BuildPath? OutputPath { get; }
Property Value
Version
Explicit package version (overrides project file version).
public string? Version { get; }
Property Value
VersionSuffix
Version suffix for pre-release packages (e.g., "beta1", "preview").
public string? VersionSuffix { get; }
Property Value
Methods
Output(BuildPath)
Sets the output directory using a BuildPath.
public NugetPackOptions Output(BuildPath path)
Parameters
pathBuildPath
Returns
Output(string)
Sets the output directory using a string path.
public NugetPackOptions Output(string path)
Parameters
pathstring
Returns
SkipBuild()
Skips build before packing (uses existing build output).
public NugetPackOptions SkipBuild()
Returns
SkipRestore()
Skips package restore before packing.
public NugetPackOptions SkipRestore()
Returns
WithConfiguration(Configuration)
Sets the build configuration (Debug or Release).
public NugetPackOptions WithConfiguration(Configuration configuration)
Parameters
configurationConfiguration
Returns
WithSource(bool)
Includes source files in the symbol package.
public NugetPackOptions WithSource(bool include = true)
Parameters
includebool
Returns
WithSymbols(bool)
Includes symbol package (.snupkg) for debugging support.
public NugetPackOptions WithSymbols(bool include = true)
Parameters
includebool
Returns
WithVersion(string)
Sets the explicit package version.
public NugetPackOptions WithVersion(string version)
Parameters
versionstring
Returns
WithVersionSuffix(string)
Sets the version suffix for pre-release packages.
public NugetPackOptions WithVersionSuffix(string suffix)
Parameters
suffixstring