3

I imported a WSP that was in the gallery (put in there by the old developer) into a new studio wsp import project. It looks really noisy (too much stuff that we don't even use when creating a site using this wsp). If I open the wsp (the cab file) and see the files I notice there aren't that many files in there.

How can I create a wsp for just these files?

2
  • 1
    What's the question?
    – James Love
    Apr 28, 2011 at 15:51
  • I am SP2010. I did solution packages with sp2007 with my last job. The structure looks all odd. Plus wsp came with worlflow and when user creates a site using this wsp it doesnt even create workflow. should i create a brand new project and import pieces from the wsp i downloaded from their sp 2010 site?
    – Roxanne
    Apr 28, 2011 at 16:04

2 Answers 2

3

It sounds like that the WSP you have there is the result of one choosing the "Save site as template" option in SharePoint 2010.

This creates a WSP with a single Elements file that contains one hell of a lot of information, including a sort of Site definition.

You will be able to poke through this file and extract the elements you required into separate Element files in a new Visual Studio Project as you see fit. This is a recommended approach.

The Import WSP file just does not work properly when you import WSPs that were created with the "Save site as a template" option. You have no further benefit than if you renamed to .cab, extracted then opened the resulting files in Notepad.

Does the WSP contain the workflow defnition element in there somewhere? If you say it comes with one, it should be in there somewhere. If the workflow came with a binary assembly you'll also be able to extract it and include it in your new Visual Studio 2010 project.

3
  • You are 100% correct. It was created with UI (like stp now they call it wsp). I asked the another team mate and he said there is not workflow associated with any list but i see the wsp brought all the content types , workflows etc. They dont use content type (as of now). Please suggest as what would be my best option to create a pristine WSP w/o any junks. (i guess like u said pick n choose from the system generated wsp). Any other tips will be really HELPFUL. Thanks
    – Roxanne
    Apr 28, 2011 at 16:24
  • It all depends what you want that WSP to do. If you want it to give the option to create a site, make a WebTemplate element, and fill it with what you need. Need list instances? Grab them from the WSP's files. Unfortunately I don't think there's an easy way to do it in visual studio as you're stuck with the format that is generated by the SharePoint UI when saving the template.
    – James Love
    Apr 28, 2011 at 16:26
  • I made a mistake by importing everything when I was creating "import wsp" type project. I need to only pick what I need for the site to be provisions (bunch of custom list, few web parts). Thanks for all your help and I will post any irregular findings. LOL. channel9.msdn.com/Blogs/funkyonex/…
    – Roxanne
    Apr 28, 2011 at 17:08
0

kind of doing something similar...when I import my wsp (generated from a save as site template) I have chosen the few items that i want but the most important part i want is the worflow itself but i can see that anywhere?

I can see the workflow associations but not the workflow itself...wierd am I doing something wrong?

S

Your Answer

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

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