Table of Contents

Class DotnetPublishOptions

Namespace
Ando.Operations
Assembly
ando.dll

Fluent builder for configuring 'dotnet publish' command options. Methods return 'this' for chaining.

public class DotnetPublishOptions
Inheritance
DotnetPublishOptions
Inherited Members

Properties

Configuration

Build configuration (Debug or Release).

public Configuration? Configuration { get; }

Property Value

Configuration?

NoBuild

Skip build before publishing.

public bool NoBuild { get; }

Property Value

bool

NoRestore

Skip restore before publishing.

public bool NoRestore { get; }

Property Value

bool

OutputPath

Output directory for published artifacts.

public BuildPath? OutputPath { get; }

Property Value

BuildPath?

Runtime

Target runtime identifier (e.g., linux-x64, win-x64).

public string? Runtime { get; }

Property Value

string

SelfContained

Whether to include .NET runtime in output.

public bool? SelfContained { get; }

Property Value

bool?

SingleFile

Whether to publish as a single executable file.

public bool SingleFile { get; }

Property Value

bool

Methods

AsSelfContained(bool)

Publishes as self-contained, including the .NET runtime. Required for machines without .NET installed.

public DotnetPublishOptions AsSelfContained(bool selfContained = true)

Parameters

selfContained bool

Returns

DotnetPublishOptions

AsSingleFile(bool)

Publishes as a single executable file. Requires self-contained and a specific runtime.

public DotnetPublishOptions AsSingleFile(bool singleFile = true)

Parameters

singleFile bool

Returns

DotnetPublishOptions

Output(BuildPath)

Sets the output directory using a BuildPath.

public DotnetPublishOptions Output(BuildPath path)

Parameters

path BuildPath

Returns

DotnetPublishOptions

Output(string)

Sets the output directory using a string path.

public DotnetPublishOptions Output(string path)

Parameters

path string

Returns

DotnetPublishOptions

SkipBuild()

Skips build before publishing (uses existing build output).

public DotnetPublishOptions SkipBuild()

Returns

DotnetPublishOptions

SkipRestore()

Skips package restore before publishing.

public DotnetPublishOptions SkipRestore()

Returns

DotnetPublishOptions

WithConfiguration(Configuration)

Sets the build configuration (Debug or Release).

public DotnetPublishOptions WithConfiguration(Configuration configuration)

Parameters

configuration Configuration

Returns

DotnetPublishOptions

WithRuntime(string)

Sets the target runtime (e.g., linux-x64, win-x64, osx-arm64).

public DotnetPublishOptions WithRuntime(string runtime)

Parameters

runtime string

Returns

DotnetPublishOptions