Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Update All Packages of solution to Latest Minor Version Nuget?

Stick together with minor versions of updated packages, in the entire solution.

Ideally Update-Package should do but that command will pick up latest version of all packages, no matter what.

EDIT: I'm hopeful that there exists a switch, so that we don't have to type in specific versions of all packages one by one, NPM, where are you, can you manage DLLs as well ;-)

like image 550
Abhijeet Avatar asked Apr 02 '19 07:04

Abhijeet


People also ask

How do I Update nuget with latest version?

Right-click the Packages folder in the project, and select Update. This will update the NuGet package to the latest version. You can double-click the Add packages and choose the specific version.


2 Answers

I managed to upgrade all my packages to their latest minor version by using the dotnet-outdated global tool like this:

dotnet tool install --global dotnet-outdated
dotnet outdated --version-lock major --upgrade

It upgraded all the packages in that folder without any problems of intermediary downgrade errors.

UPDATE NOV 2020

According to Scott Hanselman, dotnet outdated is outdated. Long live the dotnet-outdated-tool!

dotnet tool install --global dotnet-outdated-tool
dotnet outdated --version-lock major --upgrade
like image 157
Dejan Avatar answered Sep 17 '22 22:09

Dejan


Check out nukeeper to help out achieve this https://github.com/NuKeeperDotNet/NuKeeper

like image 41
Paul51 Avatar answered Sep 20 '22 22:09

Paul51