Search code examples
c#nugetnuget-package

Download all packages from private nuget feed


I want to download all packages in all version from my private nuget feed. Thats it. I have no problem in using powershell, bash, package manager what ever.

I can't use a placeholder project - that references all packages and copy my cache, because I need all versions.

Any idea?

I am working with a private nuget-feed. The feed is kind of broken, but its not in my hand to fix it. So I have to go this way...


Solution

  • With PowerShell you can do this:

    >Find-Package -Name='Package_Name'  -AllVersions -Source Local | Install-Package -Destination 'C:\SOME_PATH'
    

    The command will find all the versions of packages with name like 'Package_Name' in the source Local (has to be specified in NuGet.config), and install them to 'C:\SOME_PATH' folder. To get all the packages from the source remove the -Name parameter.

    Then you can get each .nupkg file from its own folder.