In this blog, I will explain how can to add a Sitecore NuGet Package source to reference dependencies for a solution in Visual Studio.
NuGet is the package manager for .NET. The NuGet client tools provide the ability to produce and consume packages.
The NuGet Gallery is the central package repository used by all package authors and consumers.
We can easily update any DLL (Dynamic Link Library) at any time and also remove the dependency of keeping these files locally.
In Visual Studio, go to project Right-Click and choose Manage NuGet Package. It will open a new window.
Click on the Settings menu in the top right corner. It will open a new popup.
Note: By default, NuGet package manager connects with NuGet.org. We can't add Sitecore Assemblies from NuGet.org. So, we would need to add another source to the package source.
Go into Package Source and click add button +.
Add a Name for your package. Add this URL as the Source and click OK.
For the Source URL, you can open this URL and copy the URL according to the visual studio version.
Now, reopen the manage NuGet package manager and search Sitecore for the references that you want to install according to your Sitecore version.
Sign up to our bi-weekly newsletter for a bite-sized curation of valuable insight from the Sitecore community.