views:

2569

answers:

5

I am working on a sharepoint feature which includes a couple of list definitions, 2 webparts, a feature receiver assembly and an InfoPath form.

I have to use WSPBuilder to package these, and the requirement is to package all these features into a single WSP solution file.

Now, WSP builder requires the deployment files in a particular folder structure, same as the 12 Hive of sharepoint.

My problem is that all my features were developed separately, and consist of multiple project files, and these are not necessarily in the same folder structure..

How do I use WSP Builder to package multiple features into a single WSP solution?

+6  A: 

Maybe this will help: http://www.codeplex.com/wspbuilder/Thread/View.aspx?ThreadId=43125

Ultimately, I think you gain a lot of flexibility by building your own wsp files by using a tool like NANT.

Jason
+5  A: 

There's no particular action you need to undertake in wspbuilder to have multiple features in the same solution package. All you need to do is create a new folder for each feature under the 12\TEMPLATE\FEATURES folder inside your solution in Visual Studio and place the appropriate feature.xml file in that folder. For example, you may have:

12\TEMPLATE\FEATURES\FancyFeature\feature.xml 12\TEMPLATE\FEATURES\ReallyCoolFeature\feature.xml

... and so on.

Upon building the solution, wspbuilder will read the entire tree structure of your 12 folder and append the corresponding nodes in the wsp's manifest.xml file. The same goes for any other possible subfolders inside the "TEMPLATE" folder, including IMAGES, LAYOUTS, etc: at deployment time they will all be copied in the correct folder inside the real 12 hive, because the 12 folder inside your solution is meant to be a replica of the original one.

For a better understanding, create some folders and files inside your 12 folder in the visual studio solution, compile your project and look inside the generated manifest.xml file.

Tudor Olariu
@Tudor - I think you are confusing Visual Studio Solution and Visual Studio Project. WSPBuilder has no built-in way to create one WSP solution out of several Visual Studio Projects.
vitule
A: 

The simple answer is that you are going to have to copy all the files form the individual projects into one master project for your solution. As long as all your individual feature files are in the correct location in your '12' folder then you'll be good to go.

Note: You'll need to check all your references to any assemblies as this solution will create 1 assembly for all your custom logic.

Charlie
A: 

I had trouble adding dlls to the wsp so I wrote a short article about it: How to Add DLLs to a WSP Solution

Tomas
A: 

I usually have one project in the solution designated as the "main" one. I set the dependencies so that this "main" project is built last. Then for the other projects that I want to be included in the wsp package, I edit the "Post Build Events" to xcopy the contents of the 12 folder and that dlls built by the projects into corresponding folders for the main project. Then after I build the whole solution, I can build the wsp package for the main project and know that it contains everything.

vitule