Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Update multiple packages on Package Manager Console in Visual Studio

In Visual Studio, Package Manager Console is faster than Package Manager Dialog, and that's why I always the console.

However, there are certain time when I need to update 2/3 packages at a time. Say, model + repository projects. Is there any command to specify these 2/3 packages at a time? So that I do not need to type and wait one by one.

By the way, I am using VS 2013. Thanks.

like image 612
Xin Avatar asked Oct 13 '15 03:10

Xin


People also ask

How do I refresh all NuGet packages?

For all packages, delete the package folder, then run nuget install . For a single package, delete the package folder and use nuget install <id> to reinstall the same one.

How do I Update .NET packages?

Invoke the Package Manager dialog (select Tools > NuGet Package Manager > Manage NuGet Packages for Solution). Go to the Updates tab. Select the packages you want to update (or use the Select all packages to update all packages) and click Update.


1 Answers

You can separate the update commands using ; so it looks like this:

Update-Package <Package1> -version <version1>; Update-Package <Package2> -version <version2>; Update-Package <Package3> -version <version3>

This way you can just run it and go grab a coffee while it's updating.

like image 89
Vlad Schnakovszki Avatar answered Oct 10 '22 14:10

Vlad Schnakovszki