Tamp.GitVersion.V6 0.2.0

Prefix Reserved
dotnet add package Tamp.GitVersion.V6 --version 0.2.0
                    
NuGet\Install-Package Tamp.GitVersion.V6 -Version 0.2.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Tamp.GitVersion.V6" Version="0.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Tamp.GitVersion.V6" Version="0.2.0" />
                    
Directory.Packages.props
<PackageReference Include="Tamp.GitVersion.V6" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Tamp.GitVersion.V6 --version 0.2.0
                    
#r "nuget: Tamp.GitVersion.V6, 0.2.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Tamp.GitVersion.V6@0.2.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Tamp.GitVersion.V6&version=0.2.0
                    
Install as a Cake Addin
#tool nuget:?package=Tamp.GitVersion.V6&version=0.2.0
                    
Install as a Cake Tool

Tamp.GitVersion

GitVersion CLI wrapper for Tamp.

Package GitVersion Status
Tamp.GitVersion.V6 6.x live (0.1.0)

Derives a SemVer product version from a GitFlow / GitHub-flow / trunk-based git history. Full CLI surface — outputs (json / file / buildserver / dotenv), single-variable extraction, custom format strings, config + override-config, assembly-info / project-file / WiX patching, and remote-repo args.

Requires Tamp.Core ≥ 1.0.0.

This was the first satellite released through the Tamp dogfood pipelinedotnet tamp Ci + dotnet tamp Push in .github/workflows/release.yml.

Why a separate repo

GitVersion ships independently of .NET on its own cadence (V5 → V6 in 2024, patches every couple months). Per the satellite-repo convention, third-party tools with their own release schedule live outside main.

Install

In your build script's Directory.Packages.props:

<PackageVersion Include="Tamp.GitVersion.V6" Version="0.1.0" />

In build/Build.csproj:

<PackageReference Include="Tamp.GitVersion.V6" />

Minimal adoption snippet (0.2.0+) — [GitVersion] value-injection

using Tamp;
using Tamp.GitVersion.V6;

class Build : TampBuild
{
    public static int Main(string[] args) => Execute<Build>(args);

    [GitVersion] readonly GitVersionInfo Version = null!;
    //  ↑ GitVersion 6.x runs once at bind time; result is typed + cached.
    //    Default executable: dotnet-gitversion (then gitversion). Override
    //    via [GitVersion(Executable = "...")] if needed.

    Target Image => _ => _.Executes(() =>
        Docker.Build(s => s
            .SetTag($"myapp:{Version.SemVer}-{Version.ShortSha}")));
}

GitVersionInfo carries the full GitVersion 6.x output schema: Major / Minor / Patch, MajorMinorPatch, SemVer, FullSemVer, AssemblySemVer, InformationalVersion, BranchName / EscapedBranchName / Sha / ShortSha, PreReleaseTag family, CommitsSinceVersionSource, UncommittedChanges, CommitDate, plus a Raw dictionary that captures any new fields the upstream CLI adds in patch versions.

This is the recommended shape for 0.2.0+ adopters. Lower-level GitVersion.Run(...) CLI wrapper (below) stays available for adopters who need the JSON output as a typed CommandPlan (build-graph traceability, explicit working directory, etc).

Quick example — explicit CLI wrapper (lower-level)

using Tamp;
using Tamp.GitVersion.V6;
using Tamp.NetCli.V10;

class Build : TampBuild
{
    public static int Main(string[] args) => Execute<Build>(args);

    [NuGetPackage("GitVersion.Tool", Version = "6.7.0", ExecutableName = "dotnet-gitversion")]
    readonly Tool GitVersionTool = null!;

    string? _semVer;

    Target ResolveVersion => _ => _
        .Description("Run GitVersion once and stash the SemVer for later targets.")
        .Executes(() =>
        {
            var plan = GitVersion.Run(GitVersionTool, s => s
                .SetTargetPath(RootDirectory)
                .SetShowVariable("SemVer"));
            // The runner captures stdout; parse and stash on _semVer.
        });

    Target Compile => _ => _
        .DependsOn(nameof(ResolveVersion))
        .Executes(() => DotNet.Build(s => s
            .SetProperty("Version", _semVer!)));
}

See also

License

MIT — same as tamp core. (GitVersion itself is MIT.)

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
0.2.0 93 5/13/2026
0.1.1 96 5/12/2026
0.1.0 101 5/10/2026