This is an article in a series of Sitecore how-to articles. These articles are meant to be quick guides to accomplish various tasks within Sitecore. The how-to articles have proven to be very helpful internally at One North Interactive https://www.onenorth.com. These articles assume working Sitecore knowledge. I just wanted to share the articles with the community. Hopefully you find them helpful.
Sitecore has its own NuGet repository at https://sitecore.myget.org/gallery/sc-packages. To restore/add Sitecore packages in Visual Studio, you need to add this repository to package sources.
In Visual Studio
- Go to Tools → Options
- Navigate to NuGet Package Manager → Package Sources in the navigation tree on the left.
- Click the plus button in the top right.
- At the bottom of the dialog, you can set the name and source of the newly added package source.
- Set Name to whatever you want. Say Sitecore NuGet
- Set Source to https://sitecore.myget.org/F/sc-packages/api/v3/index.json
As Corey Smith @sitecorey pointed out, you can also add a NuGet.config to your repo. Using this approach, the Sitecore feed is available even if you have not configured it in VS. Here is a good example: https://github.com/Sitecore/Habitat/blob/master/nuget.config.