I'm working on a solution which requires me to override the default ItemStyle.xsl as well as the ContentQueryMain.xsl files.

What I'm interested in knowing is; is there a way to prevent the files from being removed when I retract the solution again?

Can I somehow add them through my WSP deploy but in a way which uses SharePoint versioning so all CQWPs don't throw errors if the solution is one day removed?

  • 1
    Have you tried deploying the files using a Module? The solution retract shouldn't remove the files provisioned using a module unless you have a event receiver that's deleting them. – Aveenav Jan 14 '14 at 15:37
  • I am deploying using a module, and the xsl files are removed when I deactivate the feature which adds them. – user2536 Jan 15 '14 at 8:18
  • Try creating a new solution and add one xsl file to the module. See if it deletes the file on feature deactivation/solution retract. Create a new Module named 'Style Library', add your CustomItemStyle.xsl Your elements.xml should look like this: <Module Name="Style Library" Url="Style Library" RootWebOnly="True"> <File Path="Style Library\CustomItemStyle.xsl" Url="CustomItemStyle.xsl" Type="GhostableInLibrary" /> </Module> – Aveenav Jan 15 '14 at 15:48

Your Answer
