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.
In your build configuration:
- click “Build Features”.
- Choose “Add Build Feature
- In the drop down choose “nuGet Feed Credentials”
- Enter the path to your VSTS nuget package
- Enter your credentials
- Save it
Now run your build and it will successfully authenticate you against VSTS and download your packages.