FunFair.BuildVersion.Interfaces
6.2.20.2555-native-aot-tool
See the version list below for details.
dotnet add package FunFair.BuildVersion.Interfaces --version 6.2.20.2555-native-aot-tool
NuGet\Install-Package FunFair.BuildVersion.Interfaces -Version 6.2.20.2555-native-aot-tool
<PackageReference Include="FunFair.BuildVersion.Interfaces" Version="6.2.20.2555-native-aot-tool" />
<PackageVersion Include="FunFair.BuildVersion.Interfaces" Version="6.2.20.2555-native-aot-tool" />
<PackageReference Include="FunFair.BuildVersion.Interfaces" />
paket add FunFair.BuildVersion.Interfaces --version 6.2.20.2555-native-aot-tool
#r "nuget: FunFair.BuildVersion.Interfaces, 6.2.20.2555-native-aot-tool"
#:package FunFair.BuildVersion.Interfaces@6.2.20.2555-native-aot-tool
#addin nuget:?package=FunFair.BuildVersion.Interfaces&version=6.2.20.2555-native-aot-tool&prerelease
#tool nuget:?package=FunFair.BuildVersion.Interfaces&version=6.2.20.2555-native-aot-tool&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
- LibGit2Sharp (>= 0.32.0)
- NuGet.Versioning (>= 8.0.0)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on FunFair.BuildVersion.Interfaces:
| Package | Downloads |
|---|---|
|
Credfeto.DotNet.Repo.Tools.Release
Dotnet Repository Update tools |
|
|
FunFair.BuildVersion.Detection
Build versioning. |
|
|
FunFair.BuildVersion.Publishers
Build version publishing. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 6.2.20.2560-main | 0 | 11/19/2026 |
| 6.2.20.2559-native-aot-tool | 0 | 11/19/2026 |
| 6.2.20.2558-main | 0 | 11/19/2026 |
| 6.2.20.2557-pull-429-merge | 0 | 11/18/2026 |
| 6.2.20.2556-native-aot-tool | 0 | 11/18/2026 |
| 6.2.20.2555-native-aot-tool | 7 | 11/18/2026 |
| 6.2.20.2554-main | 7 | 11/18/2026 |
| 6.2.20.2553-native-aot-tool | 9 | 11/18/2026 |
| 6.2.20.2552-native-aot-tool | 8 | 11/18/2026 |
| 6.2.20.2551-main | 34 | 11/18/2026 |
| 6.2.20.2550-main | 43 | 11/18/2026 |
| 6.2.20.2549-main | 44 | 11/17/2026 |
| 6.2.20.2548-main | 50 | 11/17/2026 |
| 6.2.20.2547-main | 83 | 11/16/2026 |
| 6.2.20.2546-main | 86 | 11/16/2026 |
| 6.2.20.2545-main | 91 | 11/16/2026 |
| 6.2.20.2544-github-actions | 87 | 11/16/2026 |
| 6.2.20.2543-main | 86 | 11/15/2026 |
| 6.2.20.2542-main | 90 | 11/15/2026 |
| 6.2.19.2266 | 10,246 | 8/19/2026 |
### Added
- Added a --self-test command-line switch to buildversion that proves the tool can start (loads native dependencies and builds the service provider) without doing any real work, exiting 0 on success or 1 with a one-line reason on stderr (#426)
- buildversion is now published as a native AOT tool package for linux-x64, giving faster startup with no runtime install needed on linux runners
- A framework-dependent 'any' tool package is still published as a fallback for platforms other than linux-x64, since native AOT cannot be cross-compiled
### Fixed
- Fixed backslash path separators in ProjectReference paths to satisfy the msbuild-path-separator check
- Build number tag creation now re-reads the latest build-number tag and moves to the next free number when the number is already taken (HTTP 422), instead of retrying the same number, so concurrent builds no longer keep colliding on it (#408)
- Renamed the BuildNumberEnvVar test constant to BUILD_NUMBER_ENV_VAR to satisfy the IDE1006 naming rule (#405)
### Changed
- Switched test projects from xunit.v3.mtp-v2 to the Native AOT-compatible xunit.v3.aot.mtp-v2 and bumped FunFair.Test.Common/FunFair.Test.Source.Generator to 6.4.0.2617
- Dependencies - Updated CSharpIsNullAnalyzer to 0.2.19
- Restricted NuGet PackageReference asset flow (IncludeAssets) on non-analyzer packages to reduce build-time supply-chain risk, per meziantou.net guidance on limiting what NuGet packages can do
- 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.Extensions.Linq to 1.0.167.2236
- Dependencies - Updated Credfeto.Enumeration to 1.2.161.2590
- Dependencies - Updated FunFair.CodeAnalysis to 7.2.30.2708
- Removed the CommandLineParser dependency and replaced it with a trim-safe argument parser so the tool can be trimmed and published as native AOT; --help now exits 0
- The nuget-publish action now packs the native AOT linux-x64 tool package and the framework-dependent fallback package
- README updated to describe the native AOT linux-x64 package, the fallback package and the new command-line behaviour