After you save a site as template you get a WSP file that you can then import in VS and tweak it as you want.

I did this for a site today and had a lot of things in the WSP after I decompressed it, and I'm a bit confused on what is what and which is which.

Is the folders structure standard for a WSP file? Where can I find this structure defined?


There are no official statements on the structure in the WSP's generated from saving a site as template and it is for sure not a template that you should reuse or build on. IMO it's a really messy export that is hard to understand and maintain. (Some sources says it's a best practice to work on the exported WSP, but it definatley is not!)

I do recommend that you create your own WSP and then copy-paste only the bits and pieces from the exported WSP to your own solution. That way you only get the necessary stuff (since save as template includes all default content types and fields etc) and your own solution will be easier maintained.

| improve this answer | |
  • I've imported the WSP into my project and there were lots of bits and pieces to chose to import. My site had some lists and some web parts. How will I know what to import so I don't risk to not import something that is in fact needed? – JohnDoDo Oct 10 '11 at 10:51
  • 1
    First of all when importing it into VS only choose your own customizations (lists, content types etc). Then only use this import project as a temporary project. Copy and paste to a new empty project. What parts are important only you can know, and of course you might/will have to test it until you get all dependant pieces. – Wictor Wilen MCA MCM MVP Oct 10 '11 at 11:15
  • One should try to avoid using save as templates WSP files period? I'm new to both SharePoint and developing, and I did find the imported WSP-file way to messy and complex, at least for my current knowledge about the subject. – Anders Aune Oct 10 '11 at 12:14
  • 2
    No, save as template is good for exporting (and then copy paste) artefacts that you've built using the UI or SPD. Or when you need to save a site as a template for reuse. – Wictor Wilen MCA MCM MVP Oct 10 '11 at 12:42
  • @Wictor: Could I at least count on the manifest.xml file in the root of the folder structure inside the WSP as an entry point? It contains the <Solution> tag which is the highest element in a deployable package isn't it? – JohnDoDo Oct 11 '11 at 13:59

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.