# New-ConfigurationDotNetPublish

Creates DotNet publish configuration using DSL objects from a settings script block.

Project

PSPublishModule

Build, test, version, sign, and publish PowerShell modules with reusable PowerForge pipelines.

[View on GitHub](https://github.com/EvotecIT/PSPublishModule) [Visit Website](#) [Releases](https://github.com/EvotecIT/PSPublishModule/releases/tag/v3.0.124) [Changelog](#) [Get package](https://www.powershellgallery.com/packages/PSPublishModule/2.0.27)

Stars **48**

Forks **15**

Open issues **1**

PowerShell Gallery downloads **17,213**

Release **v3.0.195**

Language: C# Updated: 2026-11-25

Command 

**Module**

`PSPublishModule`

**Inputs**

`None`

**Outputs**

`PowerForge.DotNetPublishSpec`

Creates DotNet publish configuration using DSL objects from a settings script block.

## Syntax

```
New-ConfigurationDotNetPublish
[-Build <Boolean>]
[-ChecksumsPath <String>]
[-Clean <Boolean>]
[-Configuration <String>]
[-IncludeSchema]
[-Installers <DotNetPublishInstaller[]>]
[-ManifestJsonPath <String>]
[-ManifestTextPath <String>]
[-NoBuildInPublish <Boolean>]
[-NoRestoreInPublish <Boolean>]
[-Profile <String>]
[-ProjectRoot <String>]
[-Restore <Boolean>]
[-RunReportMarkdownPath <String>]
[-RunReportPath <String>]
[-Runtimes <String[]>]
[-SchemaVersion <Int32>]
[-Settings <ScriptBlock>]
[-SolutionPath <String>]
[-Targets <DotNetPublishTarget[]>]
[-UseControlledSourceProvenance <Boolean>]
[<CommonParameters>]
```

[#](#member-fecec1f81b6eefc625719393)

Parameter set: `All Parameter Sets`

## Description

This cmdlet is the DSL root for DotNet publish authoring in PSPublishModule. It accepts optional global options and merges child objects emitted by -Settings such as: New-ConfigurationDotNetTarget, New-ConfigurationDotNetInstaller, and New-ConfigurationDotNetSign.

## Examples

### Create a basic DotNet publish spec from DSL

```powershell
New-ConfigurationDotNetPublish -IncludeSchema -ProjectRoot '.' -Configuration 'Release' -Settings {
    New-ConfigurationDotNetTarget -Name 'PowerForge.Cli' -ProjectPath 'PowerForge.Cli/PowerForge.Cli.csproj' -Framework 'net10.0' -Runtimes 'win-x64' -Style PortableCompat -Zip
}
```

## Parameters

**-Build Boolean optional**

Enables build step.

**-ChecksumsPath String optional**

Optional checksums output path.

**-Clean Boolean optional**

Enables clean step.

**-Configuration String optional**

Build configuration used for build/publish.

**-IncludeSchema SwitchParameter optional**

When set, adds a relative schema reference to generated config.

**-Installers DotNetPublishInstaller[] optional**

Additional installers to append.

**-ManifestJsonPath String optional**

Optional JSON manifest output path.

**-ManifestTextPath String optional**

Optional text manifest output path.

**-NoBuildInPublish Boolean optional**

Allows --no-build in controlled-source mode or when the invocation explicitly skips build. Normal publishing rebuilds even when this setting is true.

**-NoRestoreInPublish Boolean optional**

Uses --no-restore during publish.

**-Profile String optional**

Optional active profile name.

**-ProjectRoot String optional**

Optional project root.

**-Restore Boolean optional**

Enables restore step.

**-RunReportMarkdownPath String optional**

Optional run report Markdown output path.

**-RunReportPath String optional**

Optional run report output path.

**-Runtimes String[] optional**

Default runtime identifiers.

**-SchemaVersion Int32 optional**

Optional schema version value.

**-Settings ScriptBlock optional**

Optional settings script block that emits DotNet publish DSL objects.

**-SolutionPath String optional**

Optional solution path used for restore/build/clean.

**-Targets DotNetPublishTarget[] optional**

Additional targets to append.

**-UseControlledSourceProvenance Boolean optional**

Enables optional controlled-checkout verification of evaluated build inputs.

## Common Parameters

This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.

For more information, see [about_CommonParameters](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_commonparameters).

Evotec API Reference Copyright 2026 Evotec Services

<!-- PowerForge markdown artifact sha256:169DCFF2EC9EFAB30FADE5B53614AE8A80282D067C9B398E6033BD6A002CB01C -->
