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 UseNerdbankGitVersioning → UseVersioning 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.
Sub-issue of #267. Depends on Phase 1 (#268) and Phase 4 (#271).
Scope
Buildvana.Sdk.TasksreferencesBuildvana.Versioning+ the shared config library (both packaged intoBuildvana.Sdk).gitfor height (rev-list) and branch (symbolic-ref --short, detached-HEAD → non-public); readscurrent-version.jsonandbuildvana.json(release.branches,release.prereleaseTag,versioning.assemblyVersionPrecision); callsVersionCalculator; sets$(Version),$(AssemblyVersion),$(FileVersion),$(AssemblyInformationalVersion). Clear error ifgitis absent.VersioningSDK module replacingNerdbankGitVersioning:current-version.jsonauto-detection;Module.targetsinvokes the task; keep a stub target for opt-out. RenameUseNerdbankGitVersioning→UseVersioningwith a warned alias. Remove the NBGV module and package injection.versioning.assemblyVersionPrecision(major|minor|build|revision, defaultmajor) in the calculator/task.Acceptance criteria
Buildvana.Sdkwith acurrent-version.jsongets correct$(Version)/$(AssemblyVersion)/$(FileVersion)/$(AssemblyInformationalVersion)viadotnet build(not justbv); precision honorsassemblyVersionPrecision.current-version.jsonbuild as before (stub target).**BREAKING CHANGE**for NBGV removal / the property rename / the version-file migration.