Consuming a NuGet package in Visual Studio from the Artifacts feed
In the previous recipe, we learned how to create a NuGet package and publish it to Artifacts in Azure DevOps Server. In this recipe, we will look at how we can consume the NuGet package in Visual Studio.
Getting ready
The recipe is a continuation of the previous Publishing a NuGet package to Artifacts recipe. If you have not read it, then we recommend that you go through it before continuing.
How to do it...
Let's examine how we can consume the NuGet package in Visual Studio by performing the following steps.
Connecting to the feed in Artifacts
- Go to
Artifactsand select the correct feed (if you have multiple feeds); then, copy the package source URL, as follows:

- Open Visual Studio, go to the
Toolsmenu, and then selectOptions:

- In the
Optionswindow, go toPackage Sourcesand click on theicon in the top-right corner to add a new package source. Provide a name for the source and then paste in the copied URL from Step 1. Finally...+