I have a local nuget repository (Nuget Server). I need to upload packages from Nuget.Org to my local repository for offline building.
How can I list all packages missing for some solution? I need it to list all missing packages and thier depedecies (if it's missing too).
Is there a way to do it with nuget command line, other tools, powershell script (any other way)?
Found the solution. The powershell command Find-Package can list the package and it's depedencies. Next we can use the same command on each of the required packages to verify they exists in the target nuget reposiroy.
The following powershell script uses that command. It will enumerate the required packages for the specfied package (in nuget.org repository). And than check each package existence in the target repository. It will write to CSV files:
For example, set $inputPackage to "BenchmarkDotNet", replace $inputPackage with you own repository, and the script will write all the missing packages (including BenchmarkDotNet itself if it's missing) that Benchmark dot net uses and are missing in your repository.
The above sciprt can be used manually on the top level packages a solution needs (Or can be automated to read the projects files first).