Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected NuGetPackageVersion #966

Closed
holidayfun opened this issue Jul 13, 2023 · 1 comment
Closed

Unexpected NuGetPackageVersion #966

holidayfun opened this issue Jul 13, 2023 · 1 comment

Comments

@holidayfun
Copy link

holidayfun commented Jul 13, 2023

I'm currently having some problems with the NuGetPackageVersion created by Nerdbank.GitVersioning.

The Version.json i'm using is similar to the one in #943 and the nbgv tool in use is version 3.6.133+2d32d93cb1

{
    "$schema":  "https://raw.githubusercontent.com/AArnott/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json",
    "version":  "7.1.0-next.{height}",
    "publicReleaseRefSpec":  [
      "^refs/heads/releases/v\\d+\\.\\d+$"
    ]
}

The expected output of nbgv.exe get-version would be

Version:                      7.1.0
AssemblyVersion:              7.1.0.0
AssemblyInformationalVersion: 7.1.0-next.3+85c4c89e3b
NuGetPackageVersion:          7.1.0-next.3
NpmPackageVersion:            7.1.0-next.3

But what i actually get is

Version:                      7.1.0
AssemblyVersion:              7.1.0.0
AssemblyInformationalVersion: 7.1.0-next.3+85c4c89e3b
NuGetPackageVersion:          7.1.0-next-0003
NpmPackageVersion:            7.1.0-next.3

I tried installing different versions of the nbgv tool, but the git height is always four digits and separated by a dash.

Any ideas why this might happen?

@holidayfun
Copy link
Author

Took some time to dig into the source and found the solution for my problem, changing the nuget package version did the job:

  "nugetPackageVersion": {
    "semVer": 2
  }

@AArnott AArnott closed this as not planned Won't fix, can't repro, duplicate, stale Jul 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants