Centralized versioning logic for MSBuild-based projects.
$ dotnet add package Versioning.CommonVersioning.Common provides a simple, centralized way to manage version numbers across multiple .NET projects using MSBuild. It works both for local development and automated CI builds (e.g., Azure DevOps, GitHub Actions).
VersionAssemblyVersionFileVersionInformationalVersionBaseVersion, BuildMetadata, BuildIdentifier).props and .targets (no manual imports)<PackageReference Include="Versioning.Common" Version="1.0.0" />
No manual import needed — MSBuild handles it.
In your .csproj (optional — for local development):
<PropertyGroup>
<BaseVersion>2.0.0</BaseVersion>
</PropertyGroup>
In CI:
msbuild /p:BaseVersion=2.0.0 /p:BuildMetadata=beta1 /p:BuildIdentifier=build.20250614.shaabc123
To silence logging in local builds:
<PropertyGroup>
<LogVersionInfo>false</LogVersionInfo>
</PropertyGroup>
================== Versioning Info ==================
➤ BaseVersion: 2.0.0
➤ VersionRevision: 0
➤ BuildMetadata: beta1
➤ BuildIdentifier: build.20250614.shaabc123
➤ AssemblyVersion: 2.0.0.0
➤ FileVersion: 2.0.0.0
➤ Version (NuGet): 2.0.0-beta1
➤ InformationalVersion: 2.0.0-beta1+build.20250614.shaabc123
=====================================================
🎯 TFM: net35 | Lang: VB
📄 Generating assembly version file: obj\Debug\net35\Versioning_Common_GeneratedAssemblyInfo.vb
[assembly: AssemblyVersion(...)] etc. from your existing AssemblyInfo files to avoid duplicate attribute errors.BuildMetadata for prerelease labels (e.g., alpha, rc.1)BuildIdentifier for commit hashes or CI run IDs