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