I imported a WSP (site template) in VS 2010 and compiled. I then tried to create a package (build > package). I am getting all sorts of issues. Why is that? The site templated was created using an existing subsite (and subsite has publishing activated). Onet.xml has the publishing feature but when creating a site using this WSP I don't see this feature being turned on.

  • 1
    What issues are you getting, other than the Publishing Feature not activating? (There is a reason behind this - you shouldn't be able to export a Publishing Site as a template).
    – James Love
    May 2, 2011 at 20:45
  • @James: The features are labeled like feature1, feature2, etc. Also, its brining everything, like workflow. and the source site where the template was generated from doesnt even use workflow. How do I activate publishihg? Why then SP included publishing code when creating WSP? Is there a good link on this? May 2, 2011 at 20:53
  • can you provide more information about the packaging errors? May 2, 2011 at 21:23
  • <NavBarLink is not part of the NavBar parent, then why the world they (sp) put that in that segment. File path is too long? May 2, 2011 at 21:52

1 Answer 1


The SharePoint 2010 site template has two functions. Firstly to replace the old .stp files from MOSS which were used to create new sites from a template (and did not support publishing sites). Secondly as a starting point for development by importing them into Visual Studio.

They seem to do the first job adequately, at least as well as the old .stp files. As a starting point for development the big drawback is that they pull everything in, including all the built-in list definitions and other artefacts. This makes them quite unwieldy for a developed solution package. If you are just using them as a template without further development this isn't really a problem.

For development work, the recommended approach is to use the imported .wsp as a way of generating the CAML and cherry-pick what you need, and bring those sections of code into a new project you create which will be much simpler. You can also select which parts of the site you are interested in when importing the template to reduce the amount of XML you are working with in the imported site.

So, in summary, as a tool for helping build solution packages for deploying custom site templates this is a really useful tool, and a great improvement over what we had before. As a way of generating complex custom solutions with a similar experience to using SharePoint Designer; no, we are not there yet, and probably never will be.

  • Note: original question was more general, along the lines of "what is the use of WSP site template". Question has since been edited down to a specific issue, leaving my answer somewhat out on a limb.
    – SPDoctor
    May 5, 2011 at 11:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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