Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to upgrade all NuGet packages at one time in Visual Studio 2015?

I can't find a way to upgrade all NuGet packages at one time like you can in Visual Studio 2013.

I only see how to do it one by one.

Anyone know how do upgrade all at one time?

like image 918
AZ Chad Avatar asked Jul 28 '15 22:07

AZ Chad


People also ask

How do I refresh all NuGet packages?

Switch to the Browse tab, search for the package name, select it, then select Install). 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 Visual Studio packages?

To update all the packages in your solution, first restore them, and then you can either use NuGet.exe to update the packages or from within Visual Studio you can update the packages from the Package Manager Console window, or finally you can use the Manage Packages dialog.

How often should you update NuGet packages?

2 Answers. Show activity on this post. Well, you should update whenever you are able to cope with it.

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.

What is the latest NuGet version for Visual Studio 2015?

NuGet 3.4.4 for Visual Studio 2015. NuGet is the package manager for the Microsoft development platform including .NET. The NuGet client tools provide the ability to produce and consume packages. The NuGet Gallery (nuget.org) is the central package repository used by all package authors and consumers.

How do I update all NuGet packages in a project?

Thanks to him! In VS IDE: Right-click project name in Solution Explorer => Manage Nuget Packages, in Updates lab you can choose Select all packages and Update Button. But one point you may need to know is the update action you've done is not suggested for this situation.

How do I update and reinstall packages in Visual Studio?

In Visual Studio, the Package Manager Console provides many flexible options for updating and reinstalling packages. Updating and reinstalling packages is accomplished as follows: On the Installed tab, select a package, record its name, then select Uninstall. Switch to the Browse tab, search for the package name, select it, then select Install ).

Why am I getting NuGet errors when upgrading my project?

For project upgrade, NuGet shows an error in the Project Upgrade Log. Reinstalling a package during its development: Package authors often need to reinstall the same version of package they're developing to test the behavior. The Install-Package command does not provide an option to force a reinstall, so use Update-Package -reinstall instead.


2 Answers

Open the Package Manager Console and use the Update-Package cmd-let to update all packages.

like image 55
Lukkha Coder Avatar answered Sep 30 '22 10:09

Lukkha Coder


From Package Manager Console:

foreach ($p in get-project -all) { update-package -ProjectName $p.ProjectName } 
like image 43
MikeJansen Avatar answered Sep 30 '22 10:09

MikeJansen