Command
New-ConfigurationDotNetPublish
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>]#Parameter set:
All Parameter SetsDescription
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
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
- Enables build step.
- -ChecksumsPath String
- Optional checksums output path.
- -Clean Boolean
- Enables clean step.
- -Configuration String
- Build configuration used for build/publish.
- -IncludeSchema SwitchParameter
- When set, adds a relative schema reference to generated config.
- -Installers DotNetPublishInstaller[]
- Additional installers to append.
- -ManifestJsonPath String
- Optional JSON manifest output path.
- -ManifestTextPath String
- Optional text manifest output path.
- -NoBuildInPublish Boolean
- 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
- Uses --no-restore during publish.
- -Profile String
- Optional active profile name.
- -ProjectRoot String
- Optional project root.
- -Restore Boolean
- Enables restore step.
- -RunReportMarkdownPath String
- Optional run report Markdown output path.
- -RunReportPath String
- Optional run report output path.
- -Runtimes String[]
- Default runtime identifiers.
- -SchemaVersion Int32
- Optional schema version value.
- -Settings ScriptBlock
- Optional settings script block that emits DotNet publish DSL objects.
- -SolutionPath String
- Optional solution path used for restore/build/clean.
- -Targets DotNetPublishTarget[]
- Additional targets to append.
- -UseControlledSourceProvenance Boolean
- 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.