I'm trying to develop a small utility that installs an uploaded Sitecore package.
This tool should only install using the Merge-Append option.

This article uses Overwrite. Could you please help me understand what the first argument is for, in the BehaviourOptions method.

I want unavailable items to be created & existing items to be merged by adding a new version (Merge-Append).
For that, will this be the right code.

Sitecore.Install.Items.IItemInstallerEvents events =
       new Sitecore.Install.Items.DefaultItemInstallerEvents(
           new Sitecore.Install.Utils.BehaviourOptions(Sitecore.Install.Utils.InstallMode.Merge, 

1 Answer 1


First parameter is InstallMode which can be one of 3:

  • Overwrite
  • Merge
  • Skip

Second parameter is MergeMode, only valid for Merge InstallMode. Values can be:

  • Merge
  • Append
  • Overwrite

It's the same like if you choose options in UI. When you select Merge, you can select another option from the dropdown:

enter image description here

I found the image and more information here: https://sitecorecorner.wordpress.com/2015/04/29/sitecore-package-installation-learnings/

Or here:


  • In my understanding, both the arguments in the BehaviourOptions method are only for the case of existing items. Is that correct.
    – sukesh
    Jul 30, 2020 at 15:00
  • 1
    Yes, if an item is not there, the option doesn't matter.
    – Marek Musielak
    Jul 30, 2020 at 15:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.