SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Within my site definition i added module for the deployment of a theme.

The feature gets deployed, but when I activate it the theme is not available for selection?

I have included my elements.xml and not sure what is wrong? help?

Module Name="ThemeElement" Url="_catalogs/theme" RootWebOnly="true" Path="Themes">

File Url="SP.thmx" Type="GhostableInLibrary" IgnoreIfAlreadyExists="FALSE" />   


this is the SharepointProjectItem.spdata file for completeness

ProjectItem Type="Microsoft.VisualStudio.SharePoint.Module" DefaultFile="Elements.xml" SupportedTrustLevels="All" SupportedDeploymentScopes="Web, Site" xmlns=""> Files>

ProjectItemFile Source="Elements.xml" Target="Theme\" Type="ElementManifest" />
ProjectItemFile Source="..\Theme\SP.thmx" Target="Theme\" Type="ElementFile" />



share|improve this question

Here's how to do it:

  1. Create a Module SPI
  2. Set Url for the element to _catalogs/theme, List to 123 and RootWebOnly=true
  3. Add the thmx file to the Module SPI and set the Type attribute on the element to GhostableInLibrary
  4. Add it to a Site Collection scoped feature
  5. Voila!
share|improve this answer

Deploying custom themes is covered as part of the Advanced SharePoint Developer Training for SharePoint. Please check it out if that helps you:

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.