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
Artifacts
and select the correct feed (if you have multiple feeds); then, copy the package source URL, as follows:
- Open Visual Studio, go to the
Tools
menu, and then selectOptions
:
- In the
Options
window, go toPackage Sources
and click on the+