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

Invoke-DotNetReleaseBuild

Namespace PSPublishModule
Inputs
None
Outputs
PowerForge.DotNetReleaseBuildResult

Builds a .NET project in Release configuration and prepares release artefacts.

Remarks

The cmdlet discovers the .csproj file (when a directory is provided), reads VersionPrefix from the project, then runs dotnet build and dotnet pack in Release (by default). It produces a ZIP snapshot of the release output and returns a typed result object for each input project path. Use -WhatIf to preview the planned outputs without running build/pack/sign operations.

Examples

Authored help example

Build and pack a project (and its dependency projects)


Invoke-DotNetReleaseBuild -ProjectPath '.\MyLibrary\MyLibrary.csproj' -PackDependencies
        

Build and sign a project (certificate thumbprint)


Invoke-DotNetReleaseBuild -ProjectPath '.\MyLibrary\MyLibrary.csproj' -CertificateThumbprint '0123456789ABCDEF' -LocalStore CurrentUser
        

Preview the release build plan (no build)


Invoke-DotNetReleaseBuild -ProjectPath '.\MyLibrary' -PackDependencies -WhatIf
        

Build multiple projects in one invocation


Invoke-DotNetReleaseBuild -ProjectPath '.\ProjectA\ProjectA.csproj', '.\ProjectB\ProjectB.csproj' -PackDependencies
        

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

Invoke-DotNetReleaseBuild [-CertificateThumbprint <String>] [-LocalStore <CurrentUser|LocalMachine>] [-PackDependencies] -ProjectPath <String[]> [-TimeStampServer <String>] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Parameters

CertificateThumbprint String optionalposition: namedpipeline: False
Optional certificate thumbprint used to sign assemblies and packages. When omitted, no signing is performed.
LocalStore CertificateStoreLocation optionalposition: namedpipeline: Falsevalues: 2
Certificate store location used when searching for the signing certificate. Default: CurrentUser.
Possible values: CurrentUser, LocalMachine
PackDependencies SwitchParameter optionalposition: namedpipeline: False
When enabled, also packs all project dependencies that have their own .csproj files.
ProjectPath String[] requiredposition: namedpipeline: False
Path to the folder containing the project (*.csproj) file (or the csproj file itself).
TimeStampServer String optionalposition: namedpipeline: False
Timestamp server URL used while signing. Default: http://timestamp.digicert.com.

Outputs

PowerForge.DotNetReleaseBuildResult