Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to force the Package Manager to Update a Nuget package with the same version?

How can Update be enabled even though the version number has not changed?

I'm developing a Nuget package. We're in the early stages, beta/testing. We don't change the version until testing is complete but we want to pass on the changed package for testing purposes. But the Package Manager does not see the change, allow Update, unless the version has changed, I can reinstall but I'd prefer the testers to be able to Update.

How can this be done while the version number stays the same?

like image 768
learnerplates Avatar asked Aug 07 '13 08:08

learnerplates


1 Answers

Resurrecting this as we are in the same boat (converting a monolithic solution to a Nuget-ified microservices architecture). This method works, though its a bit tedious:

Go to NuGet options and click 'Clear All NuGet Cache(s)' Do a Nuget package restore on the solution. If this ends up failing due to (e.g. Newtonsoft.json being 'in use by another process') close all instances of Visual Studio & end task on all instances of MSBuild.exe + VBCSCompiler.exe. Restart VS and it should work.

Note that removing and re-adding the package will not work as it will still use the old cached version.

like image 187
Simon Storr Avatar answered Oct 10 '22 00:10

Simon Storr