Thursday, May 17, 2018

Setting up a private VSTS NuGet feed on VS2017 for Mac

This is a personal memo on setting up a private VSTS feed  on a Mac with Visual Studio 2017 for Mac OS.



  1.  Create a new Personal Access Token (PAT). You can follow the documentation here [1] to set this up
    • Important: Make sure to set Accounts field to "All accessible (<your account>) accounts
  2.  Go to the feed details page and  click the "Connect to Feed" button. It will give you a NuGet add source command.
  3.  Load a solution with a private feed
    • Visual Studio should automatically prompt you for credentials
    • Provide the username and the PAT as the password
    • If Visual Studio does not prompt you for credentials navigate to Tools > Add Custom Tool > NuGet > Sources and enter your username and PAT (as the password)

Notes

  • The credentials are not stored under the apiKeys configuration element but rather it is stored under packageSourceCredentials as an encrypted password

References