With this blogpost, I'll begin a series of blogposts related to packaging an Episerver Add-on.
Before building an add-on of your own, make sure to have read the official documentation.
While I was prepping the presentation for Episerver Ascend on "Building and Packaging an AddOn", I've realized there are a bit too many different approaches that all work, but this one based on Ben's Reload children was done by good practices, contained Episerver recommendations and was very easy to get started with. I grabbed that one, changed it a bit and cleared it out for someone new building an add-on an easy start.
The features for this skeleton solution are:
If anyone is trying to get started with an Add-On, you can go ahead and grab the code, rename the following:
- Folders and solution/project references
- modules.config and nuspec file content
- Main.targets project name
- AssembyInfo - project name, description, owner, GUID...
There are some automatic solutions out there, but none covers everything. Make sure that when you are done, you don't get any search results on neither marija.jemuovic nor AddOn.Initial.
Next step is to add some code. This code will, by definition, depend on an Episerver package (or packages). Usually, this would be one of the .Core packages. When installing the package, use the first major version, ex. 4.0.0. After installing the Episerver add-on, add the dependency to the nuget file:
<package> <metadata> <dependencies> <dependency id="EPiServer.Forms.Core" version="[4.0.0,5.0.0)" /> </dependencies> </metadata> </package>
I am sure there are many other ways to do this, so feel free to comment and get back with feedback!