views:

3483

answers:

2

I have only ever deployed web parts from development by clicking F5. Now, I know I have to have a manifest file, feature file, etc and it all goes into a wsp file. I understand the wsp file is what gets added to Central Admin.

So my problem is this. I have found lots of sites that show how to use WSP Builder, but they don't seem to show how/where I add my web part to the WSP Builder project. My understanding is that somehow I should be able to use WSP Builder to create a wsp file containing my already-developed web part.

There are only two approaches that I see would work.

  1. I create a WSPBuilder project (like all the how-tos on WSPBuilder show), then I assume I would somehow add my web part to that project - although I don't know how.

  2. In my web part project, create WSPBuilder -> Build WSP. I have done this, and when I run stsadm on the resulting wsp file, I get it in Central Admin, but its not added to my Site Collection Features or my Web Part Gallery.

Can someone please explain this to me like I am a 6 year old? If you point me to another site, there is a good chance I have already seen it, so then I would ask you point me to the specific lines that tell me how to get my already existing web part packaged into the wsp.

A: 

To create a new web part feature with WSPBuilder:

  1. Right-click on the name of your WSPBuilder project in Visual Studioand click Add, New Item.
  2. Select WSPBuilder from the tree on the left and choose Web Part Feature from the list on the right of the dialog.
  3. Enter the title of the web part feature and click OK.
  4. In the dialog that appears enter the title, description and scope and click OK.

Your feature will now be created. You will then need to merge your existing web part code into this feature and configure its XML files.

Read this walkthrough by Tobias Zimmergren for more information. There is another walkthrough here.

Alex Angas
A: 

Alex, got the right path to solve it. I think the small exception here is that wrongly spelt Add New Item instead of New Project.

sandeept