# dotnet/Nerdbank.GitVersioning

Stamp your assemblies, packages and more with a unique version generated from a single, simple version.json file and include git commit IDs for non-official builds.

Repository: https://github.com/dotnet/Nerdbank.GitVersioning
Canonical: https://ross.abutalabs.com/products/nerdbankgitversioning
Homepage: https://dotnet.github.io/Nerdbank.GitVersioning/
Language: C#
License: MIT
License Family: permissive
Last push: 2026-08-26T04:22:52+00:00

## Health v2 (maintenance only)
Score: 93/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 80, longevity 100
- inputs: {"age_days": 4126, "days_push": 7, "days_rel": 56, "gap_med": 35, "n_releases_24m": 8}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1585, forks 186 (observed 2026-08-28T04:05:07.509362+00:00)

## What it is
A .NET library and CLI tool that generates unique, semver-compatible version numbers for assemblies and packages from a single version.json file, derived from git commit history. It integrates with MSBuild and NPM to automatically stamp builds and provides runtime access to version info via a generated ThisAssembly class.

## Use cases
- automatically version .NET assemblies from git history
- generate unique semver versions for every commit without tags
- stamp NuGet and npm packages with build versions
- embed git commit IDs in non-official builds
- backtrack from a computed version to its source git commit
- make builds reproducible without depending on git tags or branch names

## When to choose
- you build .NET projects and want automatic, deterministic versioning from git
- you need unique versions per commit for reproducible CI builds
- you want version info available at runtime in your assemblies
- you publish NuGet or npm packages and need consistent version stamping

## When to avoid
- your project is not .NET-based and you don't need the npm integration
- you prefer tag-driven or branch-name-driven versioning schemes
- you need a language-agnostic versioning solution outside MSBuild/gulp ecosystems

## Facets
- artifact type: library
- maturity: active
- function: build-tool, version-control, cli, developer-tools
- domain: developer-tools, version-control
- platform: cross-platform, dotnet, cli
- tags: semantic-versioning, msbuild, nuget, npm, git, version-stamping, ci-cd, build-reproducibility, devops, nodejs

## Member repositories
- dotnet/Nerdbank.GitVersioning (main) score 93

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:07.509362+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:55:32.200036+00:00, confidence not recorded.
  - readme: https://github.com/dotnet/Nerdbank.GitVersioning (fetched 2026-08-28T04:05:07.509362+00:00, sha 34df29295fe3)
  - homepage: https://dotnet.github.io/Nerdbank.GitVersioning/ (fetched 2026-08-29T11:26:05.832862+00:00, sha f7387339308a)
- Data as of 2026-08-30T08:39:29.467469+00:00.
