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
NoBuild
Skip build before publishing.
public bool NoBuild { get; }
Property Value
NoRestore
Skip restore before publishing.
public bool NoRestore { get; }
Property Value
OutputPath
Output directory for published artifacts.
public BuildPath? OutputPath { get; }
Property Value
Runtime
Target runtime identifier (e.g., linux-x64, win-x64).
public string? Runtime { get; }
Property Value
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
Methods
AsSelfContained(bool)
Publishes as self-contained, including the .NET runtime. Required for machines without .NET installed.
public DotnetPublishOptions AsSelfContained(bool selfContained = true)
Parameters
selfContainedbool
Returns
AsSingleFile(bool)
Publishes as a single executable file. Requires self-contained and a specific runtime.
public DotnetPublishOptions AsSingleFile(bool singleFile = true)
Parameters
singleFilebool
Returns
Output(BuildPath)
Sets the output directory using a BuildPath.
public DotnetPublishOptions Output(BuildPath path)
Parameters
pathBuildPath
Returns
Output(string)
Sets the output directory using a string path.
public DotnetPublishOptions Output(string path)
Parameters
pathstring
Returns
SkipBuild()
Skips build before publishing (uses existing build output).
public DotnetPublishOptions SkipBuild()
Returns
SkipRestore()
Skips package restore before publishing.
public DotnetPublishOptions SkipRestore()
Returns
WithConfiguration(Configuration)
Sets the build configuration (Debug or Release).
public DotnetPublishOptions WithConfiguration(Configuration configuration)
Parameters
configurationConfiguration
Returns
WithRuntime(string)
Sets the target runtime (e.g., linux-x64, win-x64, osx-arm64).
public DotnetPublishOptions WithRuntime(string runtime)
Parameters
runtimestring