# Set-ProjectVersion

Updates version numbers across multiple project files.

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.ProjectVersionUpdateResult`

Updates version numbers across multiple project files.

## Syntax

```
Set-ProjectVersion
[-ExcludeFolders <String[]>]
[-ModuleName <String>]
[-NewVersion <String>]
[-PassThru]
[-Path <String>]
[-VersionType <Major|Minor|Build|Revision>]
[<CommonParameters>]
```

[#](#method-set-projectversion-string-string-string-switchparameter-string-projectversionincrementkind)

Parameter set: `All Parameter Sets`

## Description

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

```powershell
Set-ProjectVersion -VersionType Minor -WhatIf
```

Previews the version update for all discovered project files.

### Set a specific version for one module

```powershell
Set-ProjectVersion -NewVersion '2.1.0' -ModuleName 'MyModule' -Path 'C:\Projects'
```

Updates only files related to the selected module name.

## Parameters

**-ExcludeFolders String[] optional**

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**

Optional module name to filter updates to specific projects/modules.

**-NewVersion String optional**

Specific version number to set (format: x.x.x or x.x.x.x).

**-PassThru SwitchParameter optional**

Returns per-file update results when specified.

**-Path String optional**

The root path to search for project files. Defaults to current directory.

**-VersionType ProjectVersionIncrementKind optional**

The type of version increment: Major, Minor, Build, or Revision.

Possible values: `Major`, `Minor`, `Build`, `Revision`

## 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:80C89187B6982F973D0F19ED96155423DC5C29814B5B618870F754C4A3B05A5C -->
