API Reference
Set-ProjectVersion
Updates version numbers across multiple project files.
Remarks
Updates version numbers in: C# projects (*.csproj)PowerShell module manifests (*.psd1)PowerShell build scripts that reference Invoke-ModuleBuild Use -VersionType to increment one component, or -NewVersion to set an explicit version.
Examples
Increment minor version across the repository
PS>
Set-ProjectVersion -VersionType Minor -WhatIf
Previews the version update for all discovered project files.
Set a specific version for one module
PS>
Set-ProjectVersion -NewVersion '2.1.0' -ModuleName 'MyModule' -Path 'C:\Projects'
Updates only files related to the selected module 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.
Syntax
Set-ProjectVersion [-ExcludeFolders <String[]>] [-ModuleName <String>] [-NewVersion <String>] [-PassThru] [-Path <String>] [-VersionType <Nullable`1>] [<CommonParameters>]
#
All Parameter SetsParameters
- ExcludeFolders String[]
- Path fragments (or folder names) to exclude from the search (in addition to default 'obj' and 'bin'). This matches against the full path, case-insensitively.
- ModuleName String
- Optional module name to filter updates to specific projects/modules.
- NewVersion String
- Specific version number to set (format: x.x.x or x.x.x.x).
- PassThru SwitchParameter
- Returns per-file update results when specified.
- Path String
- The root path to search for project files. Defaults to current directory.
- VersionType Nullable`1
- The type of version increment: Major, Minor, Build, or Revision.
Outputs
PowerForge.ProjectVersionUpdateResult