Build versioning tool.
License
—
Deps
0
Install Size
—
Vulns
✓ 0
Published
Mar 4, 2026
$ dotnet add package FunFair.BuildVersionSimpler/faster git specific version builder
| Branch | Status |
|---|---|
| main | |
| release |
View changelog
dotnet tool install FunFair.BuildVersion
To update to latest released version
dotnet tool update FunFair.BuildVersion
dotnet new tool-manifest
dotnet tool install FunFair.BuildVersion --local
To update to latest released version
dotnet tool update FunFair.BuildVersion --local
Supports release and hotfix branches in the following formats
version can be in the following formats:
4 is a build number passed to the tooltag is generated from the branch name (or matching branch for a pull request if it can be located)Tag restrictions
-- consecutive characters are shrunk to a single onefeature/name so that tag is processed on name onlypr-id where id is the id of the pull requestprerelease will be used. -x, --WarningsAsErrors (Default: false) Whether warnings should be errors
-b, --BuildNumber (Default: -1) The build number (use BUILD_NUMBER envrionment variable)
-s, --ReleaseSuffix (Default: ) The release suffix
-p, --Package (Default: ) The package being released
--help Display this help screen.
--version Display version information.
This will attempt to retrieve the build number (counter) from an environment variable:
dotnet buildversion
dotnet buildversion --BuildNumber 272
or
dotnet buildversion --b272
dotnet buildversion --BuildNumber 272 --ReleaseSuffix "product"
or
dotnet buildversion -b272 -s"product"
dotnet buildversion --BuildNumber 272 --ReleaseSuffix "product" --Package "package"
or
dotnet buildversion -b272 -s"product" -p"package"
dotnet buildversion --BuildNumber 272 --Package "package"
or
dotnet buildversion -b272 -p"package"
BUILD_NUMBER environment variable for the build numberTEAMCITY_VERSION environment variable is defined then the system.build.version and buildNumber variables will be set to match the build version that the tool producesGITHUB_ENV environment variable is defined then the BUILD_VERSION environment variable will be set to match the build version that the tool produces.