1
votes

I am new to VSTS Package Management Feed. I have a visual studio solution with few projects under it. All of them have packages.config and the solution has packages folder with nuget packages with each in its own sub folder

  packages_folder
      - package1_subFolder
          - package1.nupkg
      - package2_subFolder
          - package2.nupkg
    .
    .
    .
    .
      - packagen_subFolder
          - packagen.nupkg

How do I upload / push all of these packages with above folder structure to package management feed that I have created ?

1
Based on your description, all the *.nupkg are exist in packages folder under your solution. So you can use the way that uploaded nuget packages. If your folder structure is different, please edit your question.Marina Liu
@Marina-MSFT - Thanks for your response but my solution has packages folder with nuget packages each in its own sub folder. How do I push them without having to upload each one of them individually?Bala P

1 Answers

2
votes

I was able to accomplish this by using below batch command

for /r %%x in (*.nupkg) do nuget push -source "your feed url" -apikey key "%%x"

This will recursively find all the nupkg files in the current directory and push it to the destination url