Deploying SharePoint Visual Studio does not overwrite display templates on upgrade
- I have a VS SharePoint project that I put some files in, in this case the templates are displayed.
- Element.xml elements have ReplaceContent tot TRUE for every FILE record
- Deployment Conflict Resolution - PROMPT
- I see that everything is being overwritten.
He renews everything. But sometimes the display template falls back to the old version. On first launch, I go through the pages and see the old javascript code. (so I manually edited the html file to fix it).
I don't have this problem with any other elements in modules, except sometimes with display templates.
The reason the display template was not updating cost me a lot of time ... it will save you a few hours:
Inside the display template I included JavaScript.js Inside the same display template I also had a JavaScript function with the same name
I assume it was skipped and the old version was inserted in place during activation.
solved
I have the same problem and have only found a workaround and solution so far.
Workaround: If you close and restart Visual Studio with the magic display template.
Solution: Look at this page: page