Use NuGet or dotnet with Team Foundation Server feeds

Last Update: 4/25/2017

Availability
NuGet Package Management is available with Visual Studio Team Services and TFS 2017.

Authentication from command-line clients like nuget and dotnet is a little different for Team Foundation Server users.

Domain users on domain-joined machines

You can use consume packages with Visual Studio, publish with nuget, and use nuget and dotnet. Ignore any content about the Credential Provider or Personal Access Tokens—everything will work using your domain credentials.

Non-domain users (e.g. service accounts, users on non-domain-joined machines)

This workflow is not recommended, because it requires that you store your encrypted domain password on disk. Please consider the security implications before continuing.

Navigate to your feed (or create a feed if you haven't). Then, select Connect to feed:

Connect to feed button in the upper-right of the page

Next, copy the NuGet package source URL:

NuGet Package source URL in the Connect to feed dialog

Then, run the following command (replacing {values} where applicable):

nuget sources add -name {your feed name} -source {your feed URL} -username {your domain username} -password {your domain password}