Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Nuget Update-Package command extremely slow

Tags:

I have a Visual Studio 2015 solution where I want to update all my Nuget packages by making use of the Update-Package command. The solution contains 38 projects, I can see from the Package Manager console that the packages are being updated, but the process is extremely slow, it's been running for over 4 hours now.

I previously had a problem on a smaller project where the update was slow and eventually had to remove the project from TFS, update the packages then add it back to source control. Is there any reason why TFS might cause a Nuget-Package update to be slow?

like image 842
Andre Lombaard Avatar asked Sep 17 '15 11:09

Andre Lombaard


People also ask

How do I refresh a nuget package?

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 nuget to 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.

Should you update nuget packages?

Well, you should update whenever you are able to cope with it. So you need to think carefully about the regression updating the packages could cause to your application if already in production, or the extra tests you are going to need to carry on in order to verify everything seems to be working as expected.

How do I update nuget dependencies?

By Command-line: You can download nuget.exe,and add the path where it exists to Path system environment variables. Then you could simply reference the nuget.exe directly. After that you can use command like nuget update YourSolution. sln in Package Manager Console to update the dependencies for solution.


1 Answers

Packages folder being under source control aside, the updates are still extremely lengthy. Looking at NuGetGallery GitHub issue 2637, this will be fixed in nuget 3.4. I'm testing the 3.4.0-rc version now and so far it makes a huge difference, so fingers crossed.

like image 114
Jakub Januszkiewicz Avatar answered Oct 02 '22 20:10

Jakub Januszkiewicz