SharePoint 2013 Composed Look - How to add .spcolor and .preview file to SP Server via VS package?
-
10-12-2019 - |
Question
We are using VS2012 and SP2013.
Presently we are deploying a masterpage via VS module (without feature event receiver, so we are not activating it on deployment).
Then, creating a composed look with this masterpage via PowerShell. Now the problem is that, the composed look does not appear in the 'change the look and feel' unless you add a corresponding '.preview' file. Reference: Check the pre-requisites section
I need to know that:-
How do I place this .preview file via VS package into the 'C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\TEMPLATE\GLOBAL'?
We have also created a .spcolor file which needs to be uplaoded to 'themes/15 folder' via VS package.
Please guide. I guess we need to use the module project item. But what change to make in the elements.xml file?
Solution
Create a mapped folder in your project and place .preview file inside it.
Add a module to the project and provide the url which references
/_catalogs/theme/15
in the XML file in order to place .spcolor file in it.