Skip to content

Versioning Phase 6 — SDK build-time versioning task, remove the NBGV module #273

@rdeago

Description

@rdeago

Sub-issue of #267. Depends on Phase 1 (#268) and Phase 4 (#271).

Scope

  • Buildvana.Sdk.Tasks references Buildvana.Versioning + the shared config library (both packaged into Buildvana.Sdk).
  • New task: inputs are repo root + file paths; shells to git for height (rev-list) and branch (symbolic-ref --short, detached-HEAD → non-public); reads current-version.json and buildvana.json (release.branches, release.prereleaseTag, versioning.assemblyVersionPrecision); calls VersionCalculator; sets $(Version), $(AssemblyVersion), $(FileVersion), $(AssemblyInformationalVersion). Clear error if git is absent.
  • New Versioning SDK module replacing NerdbankGitVersioning: current-version.json auto-detection; Module.targets invokes the task; keep a stub target for opt-out. Rename UseNerdbankGitVersioningUseVersioning with a warned alias. Remove the NBGV module and package injection.
  • Implement versioning.assemblyVersionPrecision (major|minor|build|revision, default major) in the calculator/task.

Acceptance criteria

  • A project using Buildvana.Sdk with a current-version.json gets correct $(Version)/$(AssemblyVersion)/$(FileVersion)/$(AssemblyInformationalVersion) via dotnet build (not just bv); precision honors assemblyVersionPrecision.
  • NBGV no longer appears in the SDK package or its injection; projects without a current-version.json build as before (stub target).
  • CHANGELOG: Unreleased entries; **BREAKING CHANGE** for NBGV removal / the property rename / the version-file migration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement[issue/PR] requests / implements new or improved functionality.refactor[issue/PR] requests / implements a refactor of existing code without affecting functionality.
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions