Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

force the redownload of a nuget package

This is my scenario:

During the development of the nuget package A in project A in solution A we constantly need to test it in another project. For this reason we have a dev nuget feed that contains the unreleased package A. When building solution A it will be pushed automatically to that dev feed.

For testing we have a solution B with multiple projects that all reference package A from that dev nuget feed.

Whenever we rebuild solution A (and package a gets pushed to the feed) we want to use the new build of the package in all projects of solution B during testing.

Once package A will actually be released, it will be pushed to the release nuget feed and then solution B is supposed to pull the package from the release feed instead of the dev feed.

And these are my two questions:

What is the correct way to force a redownload of package A into the packages folder of solution B and make all projects use the new build of the package even if the version of the package did not change?

What is the proposed workflow for this (common?) scenario? Should I do it differently?

like image 325
bitbonk Avatar asked Jan 12 '16 14:01

bitbonk


1 Answers

Update-Package –reinstall <packageName>

This is automatically uninstall and install nuget package each time. Documentation is given at https://docs.nuget.org/consume/reinstalling-packages

like image 157
Mahesh Malpani Avatar answered Oct 14 '22 02:10

Mahesh Malpani