Trying to get my head round a few things with SP and SP development. I have a complete solution which was built using both the UI and SPD. I have exported the WSP and now want to import this into VS2012 and further develop the solution and place it under source control etc.

Whenever I import it a whole load of guff comes in with it, the WSP is not that big. It will import but will NOT then deploy. Am i doing this the right way or is there a preferred method for this?


  • Is the site you pulled the WSP from a publishing site? – RJ Cuthbertson Sep 12 '12 at 17:24
  • Yes I believe it is, does this make a difference? Could i just turn that feature off? – Stephen Sep 13 '12 at 8:02

Exporting a site template from a Publishing site is not supported by Microsoft (for more information about this, Stefan Gossner has a solid answer here). This is why the "Save site as template" option is not present in publishing sites. You can export the pages anyhow by tacking on a "_layouts/savetmpl.aspx" to the site, but you will get really odd behavior. I've tried to do this before, but every time I've tried to import it, Visual Studio crashes. You can rename the WSP as a CAB file and pull individual files out and try to use code from them in a fresh solution, but you shouldn't use site templates on the publishing infrastructure. Site definitions are your answer here unfortunately.

Regarding deactivating publishing and saving as a template, Gossner also addresses that:

"Also be aware that deactivating the publishing feature and creating a template of the site will not lead to a supported template! The problem is that the template would still contain all the artefacts[sic] of a publishing site like Pages library and various different properties. Creating a template of a site which previously had the publishing feature activated is unsupported in the same way as creating a template from a site which has the publishing feature activated."

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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