Episerver NugetEpiserver posts all updates for it's products to the Episerver Nuget feed. This feed is an invaluable resource if you are an Episerver developer and is the same feed where community submitted packages can be found too. Heck I even created a Episerver Nuget Feed Explorer to explore what's on the feed. Episerver encourages community contributions and appreciates all the effort that goes into the packages. However it's worth nothing that when uploading a package it is moderated before being released onto the feed to ensure the quality of the package. So there are things to bear in mind when creating a package I have summarised below.

Best practices for creating packages to go on the Episerver Nuget feed

  • Use the correct package name - Anything prefixed with "Epi", "Episerver" or "EPiServer" is reserved for Episerver packages. Any community package submitted with any one of these prefixes will be rejected.
  • Always include a project URL for you package in the Nuspec - this for example can be a link to your to your Github project, blog or even a product description page on your site. This will be shown as a link in the Nuget feed, helping users understand what the package is doing:
    Episerver Nuget Project URL
  • Keep the dependency range within a major version of Episerver products -  for example version="[9.0.0, 10.0)". Developers have had a few problems upgrading 3rd party components when major versions are released due so its better to target major versions for compatibility reasons:
    Episerver Nuget Dependencies 
  • If your package includes a binary with a dependency on Episerver always build your package against the lowest compatible version of Episerver. For example if your package is for Episerver 9 then ensure you install the EPiServer.CMS.Core v9.0.0 package when building:  
    Nuget Package Versions
  • Test your package - this may sound silly but try installing your package on the oldest and newest version of Episerver that it should support. Does it install and un-install cleanly? How about with different Episerver components (e.g. Find) installed? Test as much as you like but remember your fellow devs will thank you for it!

It should be noted that these are a set of practices I have built up myself and would be interested to hear if you have anything you think should be added. Please let me know in the comments below.


Comments