Sitecore Nuget Package: How to Add Sitecore NuGet Package in Solution

The purpose of this article to explain how can we add Sitecore Nuget Package Source.

So the required thing when we created new project that time we need to add more Sitecore references looks like.

Sitecore.Mvc
Sitecore.Kernel
Sitecore.Analytics


So what i recommend for this don't add directly from website bin folder because in future you will change the location and it will lost the reference location. we have various ways to do that but i prefer always Second Method.

  a. First we can go with lib folder like we have to create one folder under solution and copy paste .dll from bin folder to lib folder and add reference it in your solution.

 b. Second method which i personally prefer add Sitecore Nuget Package in your solution and add reference accordingly.

So For Second method we will go step by step:

When you are going to add any Sitecore reference from Nuget that time it will not show any Sitecore reference because we don't have source so firstly we have to add source.

Just go In Visual Studio
a. Go to Project  and Click right choose Manage Nuget Package
b. It will open a new window and you will in top right side a setting menu.
c. Just click on that it will open a new popup.
d. Just go in Package Source and click add button +.
e. Add Name Whatever you want.
f. Add Source URL  https://sitecore.myget.org/F/sc-packages/api/v3/index.json
g. Just click OK and close the window.


For Source URL you can open below URL and copy URL according to visual studio version.
https://doc.sitecore.com/developers/90/sitecore-experience-manager/en/sitecore-public-nuget-feed-faq.html

all fields highlighted whatever we need to change.

                        

Finally you have done the source just close and reopen manage nuget package manager and search Sitecore references whatever you want and install according to your Sitecore version.







might be it will helpful.

Happy Coding!


Comments

Popular posts from this blog

Difference between shared, Versioned and Unversioned fileds in sitecore

How to find broken links in Sitecore.

Setup First Sitecore Helix Example From Scratch (Blank solution)