VSTS package management with teamcity nuget authentication issue

The problem

You have your nuGet packages being hosted on VSTS, and published a feed via package managment.

Using teamcity to setup a build where the visual studio solution needs to reference your custom nuGet packages from VSTS .

You setup the first build step as “Nuget Installer” and configure it to restore your packages from the .sln file.

When you run the build it will fail with authentication issues connecting to the VSTS Nuget feed, with a 401 Unauthorized.

The solution

In your build configuration:

  1. click “Build Features”.
  2. Choose “Add Build Feature
  3. In the drop down choose “nuGet Feed Credentials”
  4. Enter the path to your VSTS nuget package
  5. Enter your credentials
  6. Save it

Now run your build and it will successfully authenticate you against VSTS and download your packages.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.