Search code examples
sharepoint-2013display-templates

SharePoint Visual Studio deploy does not overwrite display templates on update


  • I have a VS SharePoint project where I placed some files in, in this case display templates.
  • The elements.xml has ReplaceContent tot TRUE on each FILE entry
  • The "Deployment Conflict Resolution" properties setting is "PROMPT"
  • I see everything gets overwritten

It update everything. But sometimes a display template will revert to an old version. On first start I check the pages and see the old javascript code in there. (so i manually edit the html file to fix it).

I dont have this problem with any other elements in modules except sometimes with display templates.


Solution

  • The reason why the display template didn't update costed me a long time...this will save you some hours:

    Inside the display template I included a JavaScript .js Inside the same display template I also had a JavaScript function with the same name

    I guess it was skipped and an older version was put back in place during activation.

    solved