The IgnoreIfAlreadyExists attribute of a File element when provisioning a file can be mysterious. Most of the posts on the net are saying that:
- When this attribute is set to FALSE, an error will be thrown if the file already exists at the targeted location
- When set to TRUE, an error will not be thrown if the file already exists, but the existing file will not be updated.
I tested this with ghostable files and found that this is not quite true. My tests showed that:
- When set to FALSE, an error is raised if the file already exists
- When set to TRUE, no error is raised, and the existing file is updated if it has not been unghosted (e.g. customised post deployment using SharePoint Designer). The file is not updated if it has been unghosted/customised.
I tested this with files deployed to the master pages and page layouts gallery and the Type attribute was GhostableInLibrary.
Pingback: SharePoint 2013: Updating MasterPages and Page Layouts – using Feature | Amjad Khan