Skip to content

Latest commit

 

History

History
86 lines (57 loc) · 3.44 KB

File metadata and controls

86 lines (57 loc) · 3.44 KB
title Connect to Azure Artifacts feeds with dotnet
description How to connect to Azure Artifacts feeds with dotnet
ms.service azure-devops-artifacts
ms.custom devx-track-dotnet
ms.topic conceptual
ms.date 04/30/2024
monikerRange >= azure-devops-2020
recommendations true

Connect to Azure Artifacts feeds (dotnet)

[!INCLUDE version-gt-eq-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

Connect to feed

::: moniker range="azure-devops"

  1. Select Artifacts and then select your feed from the dropdown menu.

  2. Select Connect to feed, and then select dotnet from the NuGet section.

    :::image type="content" source="../media/dotnet-connect-to-feed.png" alt-text="A screenshot showing how to connect to a feed with dotnet.":::

  3. 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>

::: moniker-end

::: moniker range="azure-devops-2020 || azure-devops-2022"

  1. Sign in to your Azure DevOps collection, and then navigate to your project.

  2. Select Artifacts, and then select your feed from the dropdown menu.

  3. Select Connect to Feed, and then select dotnet from the left navigation pane.

  4. Follow the instructions in the Project setup section to configure your nuget.config file and connect to your feed.

    :::image type="content" source="../media/connect-to-feed-dotnet-server-2020-and-2022.png" alt-text="A screenshot showing how to connect to a feed with dotnet in Azure DevOps Server 2020 and 2022.":::

::: moniker-end

[!INCLUDE ]

Related articles