Evotec

Project

PSPublishModule

PSPublishModule is an open-source PowerShell and .NET project with packages, release history, and technical documentation.

Stars 43
Forks 13
Open issues 1
PowerShell Gallery downloads 13,876
Release v3.0.3
Language: C# Updated: 2026-04-14

API Reference

Cmdlet

New-ConfigurationDotNetTarget

Namespace PSPublishModule
Inputs
None
Outputs
PowerForge.DotNetPublishTarget

Creates a DotNet publish target entry for DotNet publish DSL.

Remarks

Creates a DotNet publish target entry for DotNet publish DSL.

Examples

Authored help example

Create a service target with matrix runtimes


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

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.

Syntax

New-ConfigurationDotNetTarget [-ClearOutput <Boolean>] -Framework <String> [-Frameworks <String[]>] [-KeepDocs] [-KeepSymbols] [-Kind <Unknown|Cli|Service|Library>] -Name <String> [-OutputPath <String>] [-ProjectId <String>] [-ProjectPath <String>] [-PruneReferences <Boolean>] [-ReadyToRun <Nullable`1>] [-RenameTo <String>] [-Runtimes <String[]>] [-Service <DotNetPublishServicePackageOptions>] [-Sign <DotNetPublishSignOptions>] [-Slim <Boolean>] [-State <DotNetPublishStatePreservationOptions>] [-Style <Portable>] [-Styles <Portable>] [-UseStaging <Boolean>] [-Zip] [-ZipNameTemplate <String>] [-ZipPath <String>] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Parameters

ClearOutput Boolean optionalposition: namedpipeline: False
Clear final output before copy.
Framework String requiredposition: namedpipeline: False
Target framework (for example net10.0 or net10.0-windows).
Frameworks String[] optionalposition: namedpipeline: False
Optional framework matrix values.
KeepDocs SwitchParameter optionalposition: namedpipeline: False
Keep documentation files (*.xml, *.pdf).
KeepSymbols SwitchParameter optionalposition: namedpipeline: False
Keep symbol files (*.pdb).
Kind DotNetPublishTargetKind optionalposition: namedpipeline: Falsevalues: 4
Target kind metadata.
Possible values: Unknown, Cli, Service, Library
Name String requiredposition: namedpipeline: False
Friendly target name.
OutputPath String optionalposition: namedpipeline: False
Optional output path template.
ProjectId String optionalposition: namedpipeline: False
Optional project catalog identifier.
ProjectPath String optionalposition: namedpipeline: False
Path to target project file (*.csproj).
PruneReferences Boolean optionalposition: namedpipeline: False
Prune ref/ folder from output.
ReadyToRun Nullable`1 optionalposition: namedpipeline: False
Optional ReadyToRun toggle for non-AOT styles.
RenameTo String optionalposition: namedpipeline: False
Optional executable rename applied after publish.
Runtimes String[] optionalposition: namedpipeline: False
Runtime identifiers.
Service DotNetPublishServicePackageOptions optionalposition: namedpipeline: False
Optional service packaging settings for this target.
Sign DotNetPublishSignOptions optionalposition: namedpipeline: False
Optional signing policy for this target.
Slim Boolean optionalposition: namedpipeline: False
Apply slimming cleanup.
State DotNetPublishStatePreservationOptions optionalposition: namedpipeline: False
Optional preserve/restore settings for rebuild-safe deployments.
Style DotNetPublishStyle optionalposition: namedpipeline: Falsevalues: 6
Primary publish style.
Possible values: Portable, PortableCompat, PortableSize, FrameworkDependent, AotSpeed, AotSize
Styles DotNetPublishStyle[] optionalposition: namedpipeline: Falsevalues: 6
Optional style matrix values.
Possible values: Portable, PortableCompat, PortableSize, FrameworkDependent, AotSpeed, AotSize
UseStaging Boolean optionalposition: namedpipeline: False
Use staging directory before final copy.
Zip SwitchParameter optionalposition: namedpipeline: False
Create zip artifact for target output.
ZipNameTemplate String optionalposition: namedpipeline: False
Optional zip file name template.
ZipPath String optionalposition: namedpipeline: False
Optional explicit zip output path.

Outputs

PowerForge.DotNetPublishTarget