# New-ConfigurationDotNetTarget

Creates a DotNet publish target entry for DotNet publish DSL.

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.DotNetPublishTarget`

Creates a DotNet publish target entry for DotNet publish DSL.

## Syntax

```
New-ConfigurationDotNetTarget
[-ClearOutput <Boolean>]
[-ExecutableIdentity <String>]
-Framework <String>
[-Frameworks <String[]>]
[-KeepDocs]
[-KeepSymbols]
[-Kind <Unknown|Cli|Desktop|Service|Library>]
-Name <String>
[-OutputPath <String>]
[-ProjectId <String>]
[-ProjectPath <String>]
[-PruneReferences <Boolean>]
[-ReadyToRun <Boolean>]
[-RenameTo <String>]
[-Runtimes <String[]>]
[-Service <DotNetPublishServicePackageOptions>]
[-Sign <DotNetPublishSignOptions>]
[-Slim <Boolean>]
[-State <DotNetPublishStatePreservationOptions>]
[-Style <DotNetPublishStyle>]
[-Styles <DotNetPublishStyle[]>]
[-SupportedRuntimes <String[]>]
[-UseStaging <Boolean>]
[-Zip]
[-ZipNameTemplate <String>]
[-ZipPath <String>]
[<CommonParameters>]
```

[#](#member-0abb275cb254aa1cc83f7d8f)

Parameter set: `All Parameter Sets`

## Examples

### Create a service target with matrix runtimes

```powershell
New-ConfigurationDotNetTarget -Name 'My.Service' -ProjectPath 'src/My.Service/My.Service.csproj' -Framework 'net10.0-windows' -Runtimes 'win-x64','win-arm64' -Style PortableCompat -Zip
```

## Parameters

**-ClearOutput Boolean optional**

Clear final output before copy.

**-ExecutableIdentity String optional**

Optional expected signed product or assembly identity for the primary executable.

**-Framework String required**

Target framework (for example net10.0 or net10.0-windows).

**-Frameworks String[] optional**

Optional framework matrix values.

**-KeepDocs SwitchParameter optional**

Keep documentation files (*.xml, *.pdf).

**-KeepSymbols SwitchParameter optional**

Keep symbol files (*.pdb).

**-Kind DotNetPublishTargetKind optional**

Target kind metadata.

Possible values: `Unknown`, `Cli`, `Desktop`, `Service`, `Library`

**-Name String required**

Friendly target name.

**-OutputPath String optional**

Optional output path template.

**-ProjectId String optional**

Optional project catalog identifier.

**-ProjectPath String optional**

Path to target project file (*.csproj).

**-PruneReferences Boolean optional**

Prune ref/ folder from output.

**-ReadyToRun Boolean optional**

Optional ReadyToRun toggle for non-AOT styles.

**-RenameTo String optional**

Optional executable rename applied after publish.

**-Runtimes String[] optional**

Runtime identifiers.

**-Service DotNetPublishServicePackageOptions optional**

Optional service packaging settings for this target.

**-Sign DotNetPublishSignOptions optional**

Optional signing policy for this target.

**-Slim Boolean optional**

Apply slimming cleanup.

**-State DotNetPublishStatePreservationOptions optional**

Optional preserve/restore settings for rebuild-safe deployments.

**-Style DotNetPublishStyle optional**

Primary publish style.

Possible values: `Portable`, `PortableCompat`, `PortableSize`, `SelfContained`, `FrameworkDependent`, `AotSpeed`, `AotSize`

**-Styles DotNetPublishStyle[] optional**

Optional style matrix values.

Possible values: `Portable`, `PortableCompat`, `PortableSize`, `SelfContained`, `FrameworkDependent`, `AotSpeed`, `AotSize`

**-SupportedRuntimes String[] optional**

Supported runtime identifiers. Used as the default target matrix and checked after runtime overrides.

**-UseStaging Boolean optional**

Use staging directory before final copy.

**-Zip SwitchParameter optional**

Create zip artifact for target output.

**-ZipNameTemplate String optional**

Optional zip file name template.

**-ZipPath String optional**

Optional explicit zip output path.

## 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:CACF298DCCC6696A65A6AADA0535D0F01900AE94AFC6ACE7222D91685413C4DA -->
