title | description | ms.service | ms.custom | ms.topic | ms.assetid | ms.date | monikerRange | recommendations |
---|---|---|---|---|---|---|---|---|
Get started with NuGet packages and Azure Artifacts |
Use Azure Artifacts to publish and download NuGet packages from your feeds |
azure-devops-artifacts |
contperf-fy21q3 |
quickstart |
C5112218-DA7E-4016-986D-2D0F70DAFA44 |
06/08/2023 |
<= azure-devops |
true |
[!INCLUDE version-lt-eq-azure-devops]
Azure Artifacts enables developers to publish and download NuGet packages from different sources such as feeds and public registries. With Azure Artifacts, you can create feeds that can be either private, allowing you to share packages with your team and specific users, or public, enabling you to share them openly with anyone on the internet.
In this article, you'll learn how to:
[!div class="checklist"]
- Create a new feed
- Set up your project and connect to your feed
- Publish NuGet packages
- Download packages from your feed
-
An Azure DevOps organization and a project. Create an organization or a project if you haven't already.
-
Install the latest NuGet version.
-
Install Azure Artifacts Credential Provider.
Azure Artifacts offers two types of feeds: project-scoped feeds and organization-scoped feeds. if you want to create a public feed, begin by creating a project-scoped feed, and then adjust the visibility settings of the project hosting your feed to public. This will effectively make your project-scoped feed accessible to the public.
::: moniker range=">= azure-devops-2019"
-
Sign in to your Azure DevOps organization, and then navigate to your project.
-
Select Artifacts, and then select your feed from the dropdown menu.
-
Select Connect to feed.
:::image type="content" source="./media/connect-to-feed-azure-devops-newnav.png" alt-text="A screenshot showing the connect to feed button.":::
-
Select NuGet.exe. If this is the first time using Azure Artifacts with Nuget.exe, ensure that you have installed all the prerequisites.
-
Follow the instructions provided in the Project setup section to configure your nuget.config file.
:::image type="content" source="./media/project-setup.png" alt-text="A screenshot showing how to set up your project.":::
::: moniker-end
::: moniker range="tfs-2018"
-
Navigate to your project
http://ServerName:8080/tfs/DefaultCollection/<ProjectName>
. -
Select Build and Release > Packages.
-
Select your feed from the dropdown menu.
-
Select Connect to feed.
:::image type="content" source="./media/connect-to-feed.png" alt-text="A screenshot showing the connect to feed button in TFS.":::
-
Select NuGet, and then follow the instruction to connect to your feed.
:::image type="content" source="./media/connect-to-nuget-feed-tfs.png" alt-text="A screenshot showing how to connect to your feed in TFS.":::
::: moniker-end
Note
Using NuGet Package Explorer to search for packages in upstreams is not supported.
Run the following command to publish your package to your feed. You can use any string for the ApiKey argument.
nuget.exe push -Source <SOURCE_NAME> -ApiKey key <PACKAGE_PATH>