Igor Buchelnikov
Igor Buchelnikov

Reputation: 565

How to download all Nuget packages referenced in VS solution as nupkg files?

I have Visual Studio 2017 solution with several Nuget packages referenced. I want build that solution on the computer not connected to the internet. So I will not able download Nuget packages. I want download all Nuget packages referenced in my solution as *.nupkg files and then specify local folder with these files as packges source (Tools -> Options -> NuGet Package Manager -> Package Sources).

I don't want download the packages manually, so number of ones is significant.

I aware about <UserFolder>\.nuget\packages folder, but that folder contains all packages ever downloaded for the all solutions. I need packages for specific solution only.

Upvotes: 3

Views: 5891

Answers (1)

zivkan
zivkan

Reputation: 15082

This question is pretty much a duplicate of a question from a year ago, where I posted an answer that is conceptually the same as what Matt Ward suggested. The difference is that instead of renaming your global packages folder, you use nuget.config to specify a different location.

Upvotes: 3

Related Questions