Copying a Sitecore references and all other NuGet packages will lead to carrying bulky solution so we are generally restoring the NuGet packages when we build the solution.

How about the Sitecore dll’s (Sitecore.Analytics, Kernel, …)?

Sitecore has released external feed that can be added /hosted with visual studio so that all the references will be managed.

The URLs for the NuGet feeds are:

  • NuGet V3 feed URL (Visual Studio 2015+)https://sitecore.myget.org/F/sc-packages/api/v3/index.json
  • NuGet V2 feed URL (Visual Studio 2012+)https://sitecore.myget.org/F/sc-packages/
  • Browse packageshttps://sitecore.myget.org/gallery/sc-package

Here is the link for sitecore released note

https://doc.sitecore.net/sitecore_experience_platform/developing/developing_with_sitecore/sitecore_public_nuget_packages_faq

This can be manually added to solution:

Options->NuGet Package Manager ->Package sources -> Add new

nuget

 

It can be hosted with builds:

Add below key and value in NuGet.config file

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageRestore>
    <add key="enabled" value="True" />
    <add key="automatic" value="True" />
  </packageRestore>
  <packageSources>
    <add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
    <add key="nuget.org" value="https://www.nuget.org/api/v2/" />
    <add key="Sitecore official"" value="https://sitecore.myget.org/F/sc-packages/api/v3/index.json" />
  </packageSources>
</configuration>

 


Leave a Reply

Your email address will not be published. Required fields are marked *

Related Posts

Fake DB

How to do unit testing for media items in Sitecore + xUnit testing : Fake DB

Unit testing in Sitecore is a tricky one since you need create an items in Fake dB. I didn’t find much information about Media items unit testing and below piece of code may help you! Read more…

Fake DB

PageContext item in Sitecore Fake DB + Unit test cases

I tried to set PageContext using  RenderingContext.EnterContext but didn’t work using (RenderingContext.EnterContext(new Rendering(), contextItem)) { I have set it using  ContextService.Get().Push(pageContext); Here is the code, which may help you using (Db db = new Db using (Db Read more…

Sitecore 8.2

Mocking a reference field in Sitecore Fake DB for Unit test cases

I’m working on Unit test cases and mocking a reference field could be a complex task. Here is the code, which may help you [Fact] public void ReferenceFieldMockingTest() { ID newTemplateId = ID.NewID; ID referenceItemId Read more…