question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Nuget Package Version and nbgv cloud NBGV_NuGetPackageVersion differ

See original GitHub issue

Nerdbank.GitVersioning Version 3.1.68

version.json

{
    "$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json",
    "version": "0.2",
    "pathFilters": ["."],
    "publicReleaseRefSpec": [
        "^refs/heads/master$"
      ]
  }

Results in package like <Package Name>.0.2.0-g49454ca976.nupkg and NBGV_NuGetPackageVersion like 0.2.1-g49454ca976.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:18 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
saulcommented, Apr 12, 2020
1reaction
saulcommented, Apr 11, 2020

OK so my understanding of the problem is that when building a project, repoRelativeProjectDirectory is the path to the directory that the csproj/fsproj lives in. When running nbgv cloud, repoRelativeProjectDirectory points to the root of the repo. This is causing version differences when relative paths are used.

I believe the bug here is that relative paths should always be relative to the version.json file, not the project directory. I’ll see if I can whip up a unit test to exercise this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

NuGet Package Version Reference
nuget.org rejects any package upload that lacks an exact version number. ... package versions differ only by suffix, NuGet chooses a version ......
Read more >
Nerdbank.GitVersioning with same config gives different ...
Nerdbank.GitVersioning with same config gives different results ... Any idea on why there is a difference on Nuget & NPM package version?
Read more >
nbgv 3.6.133
Version Downloads Last updated 3.6.133 257,166 3 months ago 3.6.132 31,654 3 months ago 3.6.128 35,466 4 months ago
Read more >
Versioning made easier with Nerdbank.GitVersioning
Using the version when creating a NuGet. If you are creating a NuGet package as part of your build you can use one...
Read more >
NuGet packages in the Package Registry
When asking for versions of a given NuGet package name, the GitLab Package Registry returns a maximum of 300 most recent versions. Do...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found