Quantcast
Channel: Active questions tagged nuget-package - Stack Overflow
Viewing all articles
Browse latest Browse all 3067

How to configure my packages or NuGet itself to automatically resolve dependencies to the lastest version in a configured range?

$
0
0

I have seen some similar questions here on StackOverflow and somes issues on GitHub concerning my problem. These are a bit different and quite old. None of the solutions worked for me or don't work anymore at all.

Have there been any changes to NuGet or the Visual Studio package manager?

nuget spec dependencies, get latest version?

Reference latest version of nuget package using PackageReference msbuild tag


I'm currently developing a few software libraries that are dependant on one another, lets say a project called

  • Company.Library.Base v1.0.0

and some other projects that depend on this base project like

  • Company.Library.Feature1 v1.0.0
  • Company.Library.Feature2 v1.0.0

The libraries will be distributed over our company NuGet repository and an application will only reference either one of the feature libraries.

On a major or minor version change of the libraries everything is fine since every package has to be updated anyway. The problem comes with a bugfix of the base project

  • Company.Library.Base v1.0.1

Now the feature libraries don't need to be updated necessarily but when I install Company.Library.Feature1 v1.0.0 it will always reference Company.Library.Base v1.0.0 and I have to manually update to Company.Library.Base v1.0.1 afterwards.

Is there a way for the NuGet package manager to always resolve to the latest revision at least when I'm doing a fresh install of the feature library?

Every package is internal so there are no compatibility issues among the library versions except major and possible minor releases but I already know how to set the allowed versions of package. Limiting these won't be a problem.

It is a lot of work to release all packages for a bugfix that doesn't affect the code of a dependant package and to make sure every employee installs the new version manually.


Edit: Setting the package version in the library project to 1.* seems to work in .NET Framework projects that still use the packages.config file.

Edit 2: Works for .NET Framework projecst since the install and update options are still available.


Viewing all articles
Browse latest Browse all 3067

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>