Overview of Nerdbank.GitVersioning
mainNerdbank.GitVersioning is a package that injects precise, SemVer-compatible Git commit information into assemblies, VSIX, NuGet, and NPM packages.
Key characteristics include:
- Build Reproducibility: Every commit can be built to produce a unique, predictable version.
- Tag-Independent: Does not rely on Git tags, which can be unreliable in certain CI environments or clones.
- Branch-Independent: Does not rely on branch names, ensuring builds remain identical regardless of which branch the HEAD is attached to.
- Version Calculation: Versions are computed using an author-defined
major.minorversion, an optional unstable tag, and a shortened Git commit ID. - CI/CD Compatibility: Works implicitly with all cloud build services and CI servers by using Git directly and integrating with MSBuild, gulp, and other build scripts.