Connect to Azure Artifacts feeds (NuGet.exe)
Azure DevOps Services | Azure DevOps Server 2022 - Azure DevOps Server 2019 | TFS 2018
Project setup
Select Artifacts and then select your feed.
Select Connect to feed.
Select NuGet.exe from the left panel.
If this is your first time using Azure Artifacts with NuGet.exe, select Get the tools in the top-right corner and follow the instructions to download and install NuGet and Azure Artifacts Credential Provider.
Follow the instructions in the Project setup to set up your nuget.config file.
Select Build and Release > Packages.
Select your feed from the dropdown menu.
Select Connect to feed.
Select NuGet from the left panel.
If this is your first time using Azure Artifacts with NuGet, select the link under Get the tools to download and install NuGet and the Credential Provider.
Run the command highlighted in step number two to add your feed URL to your nuget.config file.
Run the command highlighted in step number three if you want to publish your NuGet package.
Note
Azure Artifacts Credential Provider is supported with NuGet 4.8.2 or later. See Azure Artifacts Credential Provider for more information.
Legacy project setup (NuGet v2)
Select Artifacts and then select your feed.
Select Connect to feed.
Select NuGet.exe from the left panel.
Copy your source URL, and then replace
/v3/index.json
with/v2
.Create a Personal Access Token. Scope your PAT to the organization(s) you want to access and to one of the following scopes: Packaging (read), Packaging (read and write), or Packaging (read, write, and manage).
Run the following command in an elevated command prompt window to add your package source:
nuget sources add -name <Feed_Name> -source <Feed_URL> -username <Any_String_But_Not_Null> -password <Personal_Access_Token>
If your organization is connected to Azure Active Directory, you must first authenticate with your AD credentials and then add your personal access token using the setapikey command:
nuget sources add -name <Feed_Name> -source <Feed_URL> -username <Azure_Active_Directory_UserName> -password <Azure_Active_Directory_Password> nuget setapikey <Personal_Access_Token> -source <Feed_URL>
Legacy project setup (NuGet v2)
Select Build and Release > Packages.
Select your feed from the dropdown menu.
Select Connect to feed.
Select NuGet and then copy your source URL. Replace
/v3/index.json
with/v2
.Create a Personal Access Token. Scope your PAT to the organization(s) you want to access and to one of the following scopes: Packaging (read), Packaging (read and write), or Packaging (read, write, and manage).
Run the following command in an elevated command prompt window to add your package source:
nuget sources add -name <Feed_Name> -source <Feed_URL> -username <Any_String_But_Not_Null> -password <Personal_Access_Token>
If your organization is connected to Azure Active Directory, you must first authenticate with your AD credentials and then add your personal access token using the setapikey command:
nuget sources add -name <Feed_Name> -source <Feed_URL> -username <Azure_Active_Directory_UserName> -password <Azure_Active_Directory_Password> nuget setapikey <Personal_Access_Token> -source <Feed_URL>
Related articles
Feedback
Submit and view feedback for