# New-ConfigurationPackageBuild

Creates inline .NET/NuGet package build configuration from the module-build 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.ConfigurationPackageBuildSegment`

Creates inline .NET/NuGet package build configuration from the module-build DSL.

## Syntax

```
New-ConfigurationPackageBuild
[-AlignPackageVersions]
[-Build]
[-BuildBeforeModule]
[-CertificateStore <String>]
[-CertificateThumbprint <String>]
[-CleanStaging]
[-Configuration <String>]
[-CreateReleaseZip]
[-Enabled]
[-ExcludeDirectories <String[]>]
[-ExcludeProjects <String[]>]
[-ExpectedVersion <String>]
[-ExpectedVersionMap <IDictionary>]
[-ExpectedVersionMapAsInclude]
[-ExpectedVersionMapUseWildcards]
[-GitHubAccessToken <String>]
[-GitHubAccessTokenEnvName <String>]
[-GitHubAccessTokenFilePath <String>]
[-GitHubGenerateReleaseNotes]
[-GitHubIncludeProjectNameInTag]
[-GitHubIsPreRelease]
[-GitHubPackagesOwner <String>]
[-GitHubPrimaryProject <String>]
[-GitHubReleaseMode <String>]
[-GitHubReleaseName <String>]
[-GitHubRepositoryName <String>]
[-GitHubTagConflictPolicy <String>]
[-GitHubTagName <String>]
[-GitHubTagTemplate <String>]
[-GitHubUsername <String>]
[-IncludePrerelease]
[-IncludeProjects <String[]>]
[-IncludeSymbols]
[-Name <String>]
[-NugetCredentialSecret <String>]
[-NugetCredentialSecretEnvName <String>]
[-NugetCredentialSecretFilePath <String>]
[-NugetCredentialUserName <String>]
[-NugetSource <String[]>]
[-Options <IDictionary>]
[-OutputPath <String>]
[-OverwriteSignedAssemblies]
[-OverwriteSignedPackages]
[-PackStrategy <String>]
[-PlanOnly]
[-PlanOutputPath <String>]
[-ProvideLocalNuGetFeed]
[-PublishApiKey <String>]
[-PublishApiKeyEnvName <String>]
[-PublishApiKeyFilePath <String>]
[-PublishFailFast]
[-PublishGitHub]
[-PublishNuget]
[-PublishSource <String>]
[-ReleaseZipOutputPath <String>]
[-RootPath <String>]
[-SignAssemblies]
[-SignDependencyAssemblies]
[-SignPackages]
[-SkipDuplicate]
[-StagingPath <String>]
[-TimeStampServer <String>]
[-UpdateVersions]
[-UseAsReleaseVersionSource]
[-UseGitHubPackages]
[-VersionBindings <ProjectVersionBinding[]>]
[-VersionTracks <IDictionary>]
[<CommonParameters>]
```

[#](#member-653d464629027a1b46b64f0d)

Parameter set: `All Parameter Sets`

## Description

This cmdlet mirrors the repository package build settings normally authored in project.build.json, allowing Build-Module { } to remain the primary authoring surface for combined module and package publishing.

## Examples

### Example 1

```powershell
New-ConfigurationPackageBuild -GitHubAccessTokenFilePath 'C:\Path'
```

## Parameters

**-AlignPackageVersions SwitchParameter optional**

Align projects sharing an X-pattern to one next version based on the highest current package version in that group.

**-Build SwitchParameter optional**

Whether package projects should be built/packed.

**-BuildBeforeModule SwitchParameter optional**

Whether package outputs must be produced before the module lane runs.

**-CertificateStore String optional**

Certificate store location for package signing.

**-CertificateThumbprint String optional**

Code signing certificate thumbprint for package signing.

**-CleanStaging SwitchParameter optional**

Whether to clean staging before the package build runs.

**-Configuration String optional**

Build configuration, usually Release or Debug.

**-CreateReleaseZip SwitchParameter optional**

Whether release ZIPs should be created for package projects.

**-Enabled SwitchParameter optional**

Whether this package build lane is enabled. Defaults to true.

**-ExcludeDirectories String[] optional**

Directory names to exclude from project discovery.

**-ExcludeProjects String[] optional**

Project names to exclude.

**-ExpectedVersion String optional**

Global expected package version or X-pattern.

**-ExpectedVersionMap IDictionary optional**

Per-project expected package version map.

**-ExpectedVersionMapAsInclude SwitchParameter optional**

When true, ExpectedVersionMap acts as an include list.

**-ExpectedVersionMapUseWildcards SwitchParameter optional**

When true, ExpectedVersionMap keys support wildcard matching.

**-GitHubAccessToken String optional**

Inline GitHub access token. Prefer file or environment forms for automation.

**-GitHubAccessTokenEnvName String optional**

Environment variable containing the GitHub access token.

**-GitHubAccessTokenFilePath String optional**

Path to a file containing the GitHub access token.

**-GitHubGenerateReleaseNotes SwitchParameter optional**

Whether GitHub should generate release notes.

**-GitHubIncludeProjectNameInTag SwitchParameter optional**

Whether project name should be included in generated package GitHub tags. Defaults to true.

**-GitHubIsPreRelease SwitchParameter optional**

Whether GitHub releases should be marked prerelease.

**-GitHubPackagesOwner String optional**

GitHub user or organization that owns the GitHub Packages NuGet feed.

**-GitHubPrimaryProject String optional**

Primary project used for single-release version resolution.

**-GitHubReleaseMode String optional**

GitHub release mode, for example Single or PerProject.

**-GitHubReleaseName String optional**

GitHub release name template or override.

**-GitHubRepositoryName String optional**

GitHub repository name.

**-GitHubTagConflictPolicy String optional**

GitHub tag conflict policy.

**-GitHubTagName String optional**

GitHub tag name override.

**-GitHubTagTemplate String optional**

GitHub tag template.

**-GitHubUsername String optional**

GitHub owner/user name.

**-IncludePrerelease SwitchParameter optional**

Whether prerelease versions can be considered during version lookup.

**-IncludeProjects String[] optional**

Project names to include.

**-IncludeSymbols SwitchParameter optional**

Whether portable .snupkg symbol packages should be created.

**-Name String optional**

Optional friendly name for this package build lane.

**-NugetCredentialSecret String optional**

NuGet version lookup credential secret.

**-NugetCredentialSecretEnvName String optional**

Environment variable containing the NuGet version lookup credential secret.

**-NugetCredentialSecretFilePath String optional**

Path to a file containing the NuGet version lookup credential secret.

**-NugetCredentialUserName String optional**

NuGet version lookup credential user name.

**-NugetSource String[] optional**

NuGet sources used for version lookup.

**-Options IDictionary optional**

Additional project-build options for fields not yet modeled as first-class parameters.

**-OutputPath String optional**

Package output path override.

**-OverwriteSignedAssemblies SwitchParameter optional**

Whether existing Authenticode assembly signatures may be replaced.

**-OverwriteSignedPackages SwitchParameter optional**

Whether existing NuGet package signatures may be replaced.

**-PackStrategy String optional**

Pack strategy, for example PerProject or MSBuild.

**-PlanOnly SwitchParameter optional**

Whether to produce a plan without executing package build steps.

**-PlanOutputPath String optional**

Plan output path.

**-ProvideLocalNuGetFeed SwitchParameter optional**

Whether package outputs should be exposed as a temporary local NuGet feed for the module lane.

**-PublishApiKey String optional**

Inline NuGet publish API key. Prefer file or environment forms for automation.

**-PublishApiKeyEnvName String optional**

Environment variable containing the NuGet publish API key.

**-PublishApiKeyFilePath String optional**

Path to a file containing the NuGet publish API key.

**-PublishFailFast SwitchParameter optional**

Whether package publishing should stop on first failure.

**-PublishGitHub SwitchParameter optional**

Whether package GitHub release publishing should be enabled.

**-PublishNuget SwitchParameter optional**

Whether NuGet packages should be published.

**-PublishSource String optional**

NuGet publish source.

**-ReleaseZipOutputPath String optional**

Release ZIP output path override.

**-RootPath String optional**

Root path used for project discovery.

**-SignAssemblies SwitchParameter optional**

Whether assemblies should be signed before packages are created.

**-SignDependencyAssemblies SwitchParameter optional**

Whether copied dependency assemblies should also be signed.

**-SignPackages SwitchParameter optional**

Whether generated NuGet packages should be signed.

**-SkipDuplicate SwitchParameter optional**

Whether duplicate NuGet packages should be skipped during push.

**-StagingPath String optional**

Staging root for project-build outputs.

**-TimeStampServer String optional**

Timestamp server URL for package signing.

**-UpdateVersions SwitchParameter optional**

Whether project/package versions should be updated.

**-UseAsReleaseVersionSource SwitchParameter optional**

Whether the resolved package version should be used as the unified release version source.

**-UseGitHubPackages SwitchParameter optional**

Whether GitHub Packages should be used as the NuGet version lookup and publish feed.

**-VersionBindings ProjectVersionBinding[] optional**

Repository files whose embedded versions follow a resolved project version.

**-VersionTracks IDictionary optional**

Shared version tracks keyed by track name.

## 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:0C404F49942C9A3858945E97B5E67DCDDE40290BFB724244521AF53443B22FF7 -->
