Connect to Azure Artifacts feeds (dotnet)
Azure DevOps Services | Azure DevOps Server 2022 | Azure DevOps Server 2020
Using Azure Artifacts, you can seamlessly publish your NuGet packages to Azure Artifacts feeds so you can share them with others privately or publicly based on your feed's visibility settings. This guide will walk you through setting up your project to authenticate with your Azure Artifacts feed using the dotnet command-line interface.
Prerequisites
An Azure DevOps organization and a project. Create an organization or a project if you haven't already.
An Azure Artifacts feed. Create a new feed if you don't have one already.
Download and install the Credential provider.
Download and install the .NET Core SDK (2.1.400+).
Connect to feed
Select Artifacts and then select your feed from the dropdown menu.
Select Connect to feed, and then select dotnet from the NuGet section.
Follow the instructions in the Project setup to set up your nuget.config file. The structure of your file should look similar to this:
Project-scoped feed:
<?xml version="1.0" encoding="utf-8"?> <configuration> <packageSources> <clear /> <add key="<FEED_NAME>" value="https://pkgs.dev.azure.com/<ORGANIZATION_NAME>/<PROJECT_NAME>/_packaging/<FEED_NAME>/nuget/v3/index.json" /> </packageSources> </configuration>
Organization-scoped feed:
<?xml version="1.0" encoding="utf-8"?> <configuration> <packageSources> <clear /> <add key="<FEED_NAME>" value="https://pkgs.dev.azure.com/<ORGANIZATION_NAME>/_packaging/<FEED_NAME>/nuget/v3/index.json" /> </packageSources> </configuration>
Sign in to your Azure DevOps collection, and then navigate to your project.
Select Artifacts, and then select your feed from the dropdown menu.
Select Connect to Feed, and then select dotnet from the left navigation pane.
Follow the instructions in the Project setup section to configure your nuget.config file and connect to your feed.