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.

Dependent packages version numbers are not updated correctly.

See original GitHub issue

from @niemyjski at https://github.com/dotnet/cli/issues/5596

I was running my build with dotnet build -f net46 Foundatio.sln /p:VersionPrefix="$($env:APPVEYOR_BUILD_VERSION)" /p:VersionSuffix="$($env:VERSION_SUFFIX)" to update the predefined version properties (https://github.com/exceptionless/Foundatio/blob/73b8ee68d611d1521e48eadac1101ea054115e6c/build/version.props). This seemed to create the nuget packages with the correct version numbers but I noticed that packages (project references) didn’t have the correct version numbers.

You can see it here (https://www.nuget.org/packages/Foundatio.Redis/4.3.1280), once I started updating the version.props file on disk as a pre build task and stopped updating the properties as a parameter the issue went away as you can see here https://www.nuget.org/packages/Foundatio.Redis/4.3.1282

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
rohit21agrawalcommented, Feb 13, 2017

As far as dependent packages are concerned, Pack reads the project references version from the assets file. So whatever is written out to the assets file is what is written out in the output nuspec as well. @neilhuiz gave the right way to get the right package versions for your project references.

1reaction
TheRealPiotrPcommented, Feb 7, 2017

Since it’s a bit hidden, @niemyjski’s project uses the <GeneratePackageOnBuild> feature.

That feature comes from the NuGet.Build.Tasks.Pack package [so the issue belongs in the NuGet repo] but I took a quick look and found:

  <Target Name="_PackAsBuildAfterTarget"
          AfterTargets="Build" 
          Condition="'$(GeneratePackageOnBuild)' == 'true' AND '$(IsInnerBuild)' != 'true'"
          DependsOnTargets="Pack">
  </Target>

Note the second clause of the condition. This only triggers when we’re doing an outer build which has two implications:

  • If -f is specified then I’d not expect the packages to be produced. Are we sure we’re not seeing packages from some other build?
  • Doing partial package builds via this mechanism doesn’t seem like it should work

We’ll need to run a /v:diag build to see what’s really going on…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dependent packages version numbers are not updated ...
I was running my build with dotnet build -f net46 Foundatio.sln ... Dependent packages version numbers are not updated correctly. #7688.
Read more >
Updating dependency version that doesn't change ...
1 Answer 1 ... Unless your package is a meta-package built to provide the package Foo , technically, it wouldn't require a change...
Read more >
How to Update NPM Dependencies
Here's a workflow that helps me stay on top of updates: first, discover which packages need to be updated and how far behind...
Read more >
How to Manage Dependency Version More Efficiently
The version number of npm packages has a specific format. The format is- MAJOR.MINOR.PATCH. ... Step 3: Update Dependency Version.
Read more >
Best Practices for Versioning NuGet Packages in ...
In this article, I'll explain how you can properly use version numbers to speed up the development process, keep things organized, ...
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