Skip to content

Latest commit

 

History

History
108 lines (66 loc) · 4.14 KB

File metadata and controls

108 lines (66 loc) · 4.14 KB
title Publish and download NuGet packages with Azure Artifacts
description Learn how to use Azure Artifacts to publish and download NuGet packages.
ms.service azure-devops-artifacts
ms.topic quickstart
ms.author rabououn
author ramiMSFT
ms.assetid C5112218-DA7E-4016-986D-2D0F70DAFA44
ms.date 06/20/2025
monikerRange <=azure-devops
recommendations true

Publish and download NuGet packages with Azure Artifacts

[!INCLUDE version-lt-eq-azure-devops]

Azure Artifacts enables developers to publish and download NuGet packages from feeds or public registries. Feeds can be either private, allowing you to share packages with specific users, or public, making your packages accessible to anyone on the internet.

This article guides you through creating a feed, configuring your project, and publishing and downloading NuGet packages.

Prerequisites

Product Requirements
Azure DevOps - An Azure DevOps organization.
- An Azure DevOps project.
- Download and install the Azure Artifacts Credential Provider.
- Install the latest NuGet version.

Create a feed

[!INCLUDE ]

Connect to a feed

::: moniker range="azure-devops"

  1. Sign in to your Azure DevOps organization, and then go to your project.

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

  3. Select Connect to Feed, and then select NuGet.exe from the left navigation pane. If this is your first time using Azure Artifacts with Nuget.exe, make sure you've installed the prerequisites.

  4. Follow the provided instructions under the Project setup section to set up your nuget.config file and connect to your Azure Artifacts feed.

    :::image type="content" source="./media/project-setup.png" alt-text="A screenshot displaying how to set up your project and connect to your feed in Azure DevOps Services.":::

::: moniker-end

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

  1. Sign in to your Azure DevOps server, and then go to your project.

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

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

  4. Follow the provided instructions under the Project setup section to set up your nuget.config file and connect to your Azure Artifacts feed.

    :::image type="content" source="./media/connect-to-feed-nuget-server-2020.png" alt-text="A screenshot displaying how to set up your project and connect to your feed in Azure DevOps Server 2020 and 2022.":::

::: moniker-end

Publish packages to your feed

To publish a package to your feed, run the following command. The ApiKey parameter is required, but you can use any arbitrary string as its value.

nuget.exe push -Source <SOURCE_NAME> -ApiKey key <PACKAGE_PATH>

Examples

  • Project-scoped feed:

    nuget.exe push -Source https://pkgs.dev.azure.com/myOrganization/MyProject/_packaging/MyFeed/nuget/v3/index.json -ApiKey AZ release/myDemoPackage.1.0.0.nupkg
    
  • Organization-scoped feed:

    nuget.exe push -Source https://pkgs.dev.azure.com/myOrganization/_packaging/myFeed/nuget/v3/index.json -ApiKey AZ release/myDemoPackage.1.0.0.nupkg
    

Note

The ApiKey is required, but you can use any arbitrary value when publishing to Azure Artifacts feeds.

Download packages from your feed

To restore packages from your feed, run the following command in your project directory:

nuget.exe restore

::: moniker range="azure-devops"

Note

Searching for packages in upstream sources using the NuGet Package Explorer is not supported.

::: moniker-end

Related content