Monday, March 10, 2014

Deploy site definitions to both SharePoint 2010 and SharePoint 2013 experience versions

When we deploy a site definition in SharePoint 2013, it will be deployed to 15 hive. Hence it will be listed in the template selection section. But as expected it will not be listed if we select the experience version as 2010

image

But what if we need the template to be available in both 2010 and 2013 experience versions. It’s very simple, we just need to specify the CompatibilityLevel switch when deploying the solution. To learn more on compatibility levels you can refer this article

  1. Add-SPSolution -LiteralPath "C:\Deploy\STSTest.wsp"
  2. Install-SPSolution -Identity STSTest.wsp -CompatibilityLevel14,15” -GACDeployment -force

Then the template will be available for 2010 experience version as well

image

No comments: