I’ve been working a lot on Sitecore development infrastructure recently and package management is one of the areas, particularly NuGet.

Unfortunately, Sitecore doesn’t provide any feed that you could use right away. so carrying over Sitecore DLLs in a repository is a standard practice that I’ve seen for few years and have actually been using.

So I decided to create my packages and here how I did it.

Versioning

My goal was to create versioned packages for every version starting from 8.0. Once I started I found out that versioning of DLL and installation ZIP - two things not related one to each other. Major versions of DLLs were not in sync with release numbers. And I’m not even talking about update number, which is not there in any form.

After few attempts to use Sitecore DLL version, I gave up and come up with my own: MAJOR_VERSION.MINOR_VERSION.UPDATE.REVISION_DATE.

This structure is simple and intuitive. You don’t need to remember that update 3 to version 8.0 was released on Apr 27th, 2015.

Also, I’ve made the following simplification - everything that is coming from one installation ZIP would have one version.

Generation

The generation has a few steps described in a PowerShell script:

  • find DLLs starting with Sitecore in website/bin folder;
  • generate version and description based on version;
  • go with Reflection into an assembly and detect dependencies to other Sitecore libraries;
  • detect the assembly framework and generate **.nuspec **file
  • generate NuGet package and push it into your feed

Results

Once packages are generated and pushed to a NuGet repository we have the following picture. Enjoy!

2016-08-05_0133

Follow me on Twitter @true_shoorik. I would be glad to discuss the ideas above in the comments.