FunFair.BuildVersion.Detection
6.2.20.2593-github-actions
See the version list below for details.
dotnet add package FunFair.BuildVersion.Detection --version 6.2.20.2593-github-actions
NuGet\Install-Package FunFair.BuildVersion.Detection -Version 6.2.20.2593-github-actions
<PackageReference Include="FunFair.BuildVersion.Detection" Version="6.2.20.2593-github-actions" />
<PackageVersion Include="FunFair.BuildVersion.Detection" Version="6.2.20.2593-github-actions" />
<PackageReference Include="FunFair.BuildVersion.Detection" />
paket add FunFair.BuildVersion.Detection --version 6.2.20.2593-github-actions
#r "nuget: FunFair.BuildVersion.Detection, 6.2.20.2593-github-actions"
#:package FunFair.BuildVersion.Detection@6.2.20.2593-github-actions
#addin nuget:?package=FunFair.BuildVersion.Detection&version=6.2.20.2593-github-actions&prerelease
#tool nuget:?package=FunFair.BuildVersion.Detection&version=6.2.20.2593-github-actions&prerelease
Build Version
Simpler/faster git specific version builder
Build Status
| Branch | Status |
|---|---|
| main | |
| release |
Release Notes/Changelog
View changelog
Installation
Install as a global tool
dotnet tool install FunFair.BuildVersion
To update to latest released version
dotnet tool update FunFair.BuildVersion
Install as a local tool
dotnet new tool-manifest
dotnet tool install FunFair.BuildVersion --local
To update to latest released version
dotnet tool update FunFair.BuildVersion --local
Supported Branch formats
Supports release and hotfix branches in the following formats
- release/version
- release/package/version
- release-platform/package/version
- release-platform/version
- hotfix/version
- hotfix/package/version
- hotfix-platform/package/version
- hotfix-platform/version
version can be in the following formats:
- 1
- 1.2
- 1.2.3
Output Release Formats
- Release branches: 1.2.3.4;
- where 4 is a build number passed to the tool
- Pre-Release branches 1.2.3.4-tag
- where
4is a build number passed to the tool - where
tagis generated from the branch name (or matching branch for a pull request if it can be located)
- where
Tag restrictions
- Maximum length before truncating after any processing: 15 characters
- Non alphanumeric characters are replaced with
- - Multiple
-consecutive characters are shrunk to a single one - removes the top folder of the branch when using branches like
feature/nameso that tag is processed onnameonly - For Pull requests, if a branch cannot be located by its SHA hash then the tag will become
pr-idwhereidis the id of the pull request - if no suitable tag can be generated the tag
prereleasewill be used.
Command line arguments
-x, --WarningsAsErrors Whether warnings should be errors
-b, --BuildNumber The build number
-s, --ReleaseSuffix The release suffix
-p, --Package The package being released
-t, --GithubToken Github access token
-f, --TagPrefix Git tag prefix
--self-test Check the tool can start, without touching the repository, and exit
--help Display this help screen
--version Display version information
Values can be given as the next argument (--BuildNumber 272, -b 272), after = for long names (--BuildNumber=272) or attached to a short name (-b272). Option names are case-sensitive, and each option can be given only once.
When --BuildNumber is not given, the build number is read from the BUILD_NUMBER environment variable.
Supported platforms
The tool is published as a native AOT executable for linux-x64, so it starts without the .NET runtime on that platform. Every other platform installs the framework-dependent package, which needs the .NET runtime.
Checking the tool can start
dotnet buildversion --self-test
Starts the tool far enough to load its runtime and native dependencies (including libgit2) and build its services, then exits. It does not open the repository, look up a build number, read or write files, or use the network.
- Exit code
0: the tool started successfully. - Exit code
1: start-up failed; a one-line reason is written to stderr.
Use it after installing the tool (for example in a container image build) to catch a release that cannot start in that environment.
Running without arguments
This will attempt to retrieve the build number (counter) from an environment variable:
- BUILD_NUMBER (Set by CI tools like TeamCity)
dotnet buildversion
Running with release branches in format /release/version
dotnet buildversion --BuildNumber 272
or
dotnet buildversion --b272
Running with release branches in format /release-product/version
dotnet buildversion --BuildNumber 272 --ReleaseSuffix "product"
or
dotnet buildversion -b272 -s"product"
Running with release branches in format /release-product/package/version
dotnet buildversion --BuildNumber 272 --ReleaseSuffix "product" --Package "package"
or
dotnet buildversion -b272 -s"product" -p"package"
Running with release branches in format /release/package/version
dotnet buildversion --BuildNumber 272 --Package "package"
or
dotnet buildversion -b272 -p"package"
Integrations
TeamCity
- Picks up the
BUILD_NUMBERenvironment variable for the build number - If
TEAMCITY_VERSIONenvironment variable is defined then thesystem.build.versionandbuildNumbervariables will be set to match the build version that the tool produces
GitHub Actions
- If
GITHUB_ENVenvironment variable is defined then theBUILD_VERSIONenvironment variable will be set to match the build version that the tool produces.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net11.0 is compatible. |
-
net11.0
- Credfeto.Extensions.Linq (>= 1.0.168.2245)
- FunFair.BuildVersion.Interfaces (>= 6.2.20.2593-github-actions)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 6.2.20.2597-main | 0 | 12/5/2026 |
| 6.2.20.2596-main | 0 | 12/5/2026 |
| 6.2.20.2595-main | 0 | 12/5/2026 |
| 6.2.20.2594-main | 0 | 12/5/2026 |
| 6.2.20.2593-github-actions | 45 | 12/4/2026 |
| 6.2.20.2592-main | 45 | 12/4/2026 |
| 6.2.20.2591-main | 47 | 12/4/2026 |
| 6.2.20.2590-main | 46 | 12/4/2026 |
| 6.2.20.2589-main | 39 | 12/4/2026 |
| 6.2.20.2588-main | 43 | 12/4/2026 |
| 6.2.20.2587-pull-434-merge | 50 | 12/4/2026 |
| 6.2.20.2586-github-actions | 53 | 12/4/2026 |
| 6.2.20.2585-github-actions | 49 | 12/4/2026 |
| 6.2.20.2584-main | 45 | 12/3/2026 |
| 6.2.20.2583-main | 50 | 12/3/2026 |
| 6.2.20.2582-main | 49 | 12/3/2026 |
| 6.2.20.2581-main | 45 | 12/3/2026 |
| 6.2.20.2580-main | 45 | 12/3/2026 |
| 6.2.20.2579-main | 49 | 12/3/2026 |
| 6.2.19.2266 | 3,603 | 8/19/2026 |
### Added
- Added a --self-test switch that checks buildversion can start, exiting 0 or 1 with a reason (#426)
- buildversion is now published as a native AOT tool package for linux-x64 for faster startup
- A framework-dependent 'any' tool package is still published as a fallback for other platforms
### Fixed
- Fixed backslash path separators in ProjectReference paths (msbuild-path-separator check)
- Build number tag creation moves to the next free number when a number is already taken (#408)
- Renamed BuildNumberEnvVar test constant to BUILD_NUMBER_ENV_VAR for the IDE1006 rule (#405)
### Changed
- Switched test projects to xunit.v3.aot.mtp-v2 and bumped FunFair.Test packages to 6.4.0.2617
- Dependencies - Updated CSharpIsNullAnalyzer to 0.2.19
- Restricted NuGet IncludeAssets on non-analyzer packages to reduce build-time supply-chain risk
- Dependencies - Updated Microsoft.Sbom.Targets to 4.1.13
- Dependencies - Updated Microsoft.VisualStudio.Threading.Analyzers to 18.12.1
- Dependencies - Updated Roslynator.Analyzers to 5.0.1
- Dependencies - Updated Nullable.Extended.Analyzer to 1.19.0
- Dependencies - Updated FunFair.Test to 6.4.7.2960
- Dependencies - Updated FunFair.Test.Source.Generator to 6.4.7.2960
- Dependencies - Updated xunit.analyzers to 2.3.0
- Dependencies - Updated xunit.v3 to 4.0.3
- Updated to .NET 11 (net11.0, global.json SDK, runtime-async) - #421
- SDK - Updated DotNet SDK to 11.0.100
- Dependencies - Updated SonarAnalyzer.CSharp to 10.36.0.15337
- Dependencies - Updated Microsoft.Extensions to 11.0.0
- Dependencies - Updated NuGet to 8.0.0
- Dependencies - Updated Philips.CodeAnalysis.MaintainabilityAnalyzers to 2.2.0
- Dependencies - Updated Meziantou.Analyzer to 3.0.341
- Dependencies - Updated Credfeto.Version.Information.Generator to 1.0.144.1853
- Dependencies - Updated Credfeto.Enumeration to 1.2.161.2590
- Dependencies - Updated FunFair.CodeAnalysis to 7.2.30.2708
- Dependencies - Updated Credfeto.Extensions.Linq to 1.0.168.2245
- Publish buildversion as a native AOT, trimmed dotnet tool
- Replaced CommandLineParser with a trim-safe argument parser for native AOT; --help now exits 0
- The nuget-publish action now packs the native AOT linux-x64 and framework-dependent packages
- README describes the native AOT linux-x64 package, the fallback and new command-line behaviour