API Reference
Invoke-DotNetReleaseBuild
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
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>]
#
All Parameter SetsParameters
- CertificateThumbprint String
- Optional certificate thumbprint used to sign assemblies and packages. When omitted, no signing is performed.
- LocalStore CertificateStoreLocation
- Certificate store location used when searching for the signing certificate. Default: CurrentUser.
- Possible values:
CurrentUser,LocalMachine - PackDependencies SwitchParameter
- When enabled, also packs all project dependencies that have their own .csproj files.
- ProjectPath String[]
- Path to the folder containing the project (*.csproj) file (or the csproj file itself).
- TimeStampServer String
- Timestamp server URL used while signing. Default: http://timestamp.digicert.com.
Outputs
PowerForge.DotNetReleaseBuildResult