Skip to content

IPublish Interface

Definition

A build which publishes binaries.

C#
public interface IPublish : ICompile, IHasGitVersion, IRestore, IHasArtifacts, INukeBuild

Properties

PublishDirectory

Gets the custom directory to publish binaries to, if any.

C#
AbsolutePath? PublishDirectory { get; }

PublishDirectoryOrDefault

Gets the directory to publish binaries to.

C#
AbsolutePath PublishDirectoryOrDefault { get; }

PublishFrameworks

Gets the frameworks to publish, if any. By default, publish all frameworks.

C#
string[]? PublishFrameworks { get; }

PublishProjects

Gets the projects to publish, if any. By default, publish the solution.

C#
string[]? PublishProjects { get; }

ZipPublishOutput

Gets a value indicating whether to create a ZIP archive for each published project.

C#
bool ZipPublishOutput { get; }

ValidatePublishOutput

Gets a mapping from project name to its expected publish output.

C#
string[]? ValidatePublishOutput { get; }

Publish

Gets the target to publish binaries.

C#
Target Publish { get; }

PublishSettingsBase

Gets the default publish settings.

C#
Configure<DotNetPublishSettings> PublishSettingsBase { get; }

PublishSettings

Gets the custom publish settings.

C#
Configure<DotNetPublishSettings> PublishSettings { get; }

Methods

RunPublish()

Publishes binaries.

C#
void RunPublish()

DotNetPublish(string?)

Runs dotnet publish.

C#
string[]? DotNetPublish(string? project = null)

Parameters

project string
The project to publish.

Returns

string[]
The target directories that were published.

SetPublishFramework(string?)

Configures dotnet publish to a specific framework.

C#
Configure<DotNetPublishSettings> SetPublishFramework(string? framework)

Parameters

framework string
The framework.

Returns

Nuke.Common.Tooling.ConfigureNuke.Common.Tools.DotNet.DotNetPublishSettings
Configured publish settings.

SetPublishProject(string)

Configures dotnet publish to a specific project.

C#
Configure<DotNetPublishSettings> SetPublishProject(string project)

Parameters

project string
The project.

Returns

Nuke.Common.Tooling.ConfigureNuke.Common.Tools.DotNet.DotNetPublishSettings
Configured publish settings.