Skip to main content

Restoring Nuget packages in less annoying way

Hope most of you are aware of Nuget packages. It is a way to get 3rd party libraries into your project. Nuget also makes developer's life easier by checking for updates for all the available libraries.

Apart from this Nuget also provides package restoration option, which is disabled by default. Another annoying thing about restoration is, it is very very slow. So, it means that until your restoration is complete, you can not do anything.

What is the solution or workaround of this slow restoration of Nuget package ?

Well, one workaround can be instead of restoring packages from Visual Studio, why can't we do it outside of Visual Studio. Interesting, isn't it ???

A Very simple and straight forward command to do this is:

NuGet.exe restore [SolutionFile] –PackagesDirectory [PackagesDirectory]