Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VSTS Build Definition : adding multiple feeds in Nuget restore task

I am in the process of setting up a VSTS build definition. The build definition is simple. Steps :

  1. get the source from VSTS Git repo's master branch
  2. restore nuget packages
  3. run msbuild

Step 2 is setup as following :

enter image description here

When I use "Feed(s) I select here", it only allows me to select one feed. Is this a bug ? Or the only way to use multiple feeds is through Nuget.config ?

like image 290
dparkar Avatar asked Feb 27 '18 02:02

dparkar


2 Answers

According to the docs, you have two options:

  • use NuGet.org and/or one Package Management feed in the same account/collection as the build (this is the option you chose in your example)

OR

  • to use feeds specified in a NuGet.config file you've checked into source control (if you switch the radio button to "Feeds in my nuget.config")
like image 75
Yan Sklyarenko Avatar answered Oct 25 '22 09:10

Yan Sklyarenko


As another work around, one could also choose to create a downstream feed that is only an aggregate of the upstream feeds and use the aggregate feed name in the build.

With this approach, it may be prudent to remove any non-admin users from having access to this feed to prevent packages being added to it directly.

Illustrations:




like image 35
Josh Gust Avatar answered Oct 25 '22 11:10

Josh Gust