building sharepoint solutions (easy mode)

one of the hurdles i encountered when i first started working with Sharepoint was how to create solutions and deploy them quickly. writing the CAML for the manifest from scratch seemed tedious and daunting, and well…it is (tedious more than daunting). the manual nature of creating the cab files (and thus the solution package) becomes cumbersome, particularly when you are troubleshooting issues in deployment, have many solutions to keep track of, and/or are just plain lazy (in this case, the time saved makes a good business case)!

enter wspbuilder!

from the wspbuilder codeplex site:

A SharePoint Solution Package (WSP) creation tool for WSS 3.0 & MOSS 2007

No more manually creating the manifest.xml file.
No more manually specifying the DDF file.
No more using the makecab.exe application.

The WSPbuilder is a console application that creates SharePoint Solutions files based on a folder structure. WSPBuilder will automatically traverse a “12” folder structure and creates a SharePoint solution manifest.xml and the wsp file based on the files it finds. Therefore you do not need the knowledge of how to create a solution manifest.xml and wsp file any more.


figure 1: the “12” folder structure
this is a great little tool that does all the tedious work auto-magically. all you have to do is create your features within the folder structure using “12” folder (simulating the Sharepoint folder structure) at the top as shown in figure 1.

there are a few setup/use instructions that aren’t explained plainly (at least, none that i could find easily). here’s what i did to set it up and use it:

  1. download & install WSPBuilder (you can download the extensions for integration in visual studio or the standalone exe…i tried out the VS plugin, and was unsuccessful in getting the project to build properly)
  2. modify your computer’s PATH environment variable by adding the folder where you installed wspbuilder.exe (for example, my addition was “C:Program FilesWSPToolsWSPBuilderExtensions”) to the path
  3. whenever you need to build a sharepoint solution (manifest + cab creation = compiled wsp), open a command prompt
  4. navigate to where your 12 folder is for the project you’re working on (for example, %VisualStudioProjects%feature1 which contains %VisualStudioProjects%feature112)
  5. type wspbuilder and hit enter

you will end up with a nicely packaged .wsp file (in addition to a solutionid.txt file, that’s not required for deployment). you can now run your addsolution command from stsadm.

wspbuilder makes things much simpler!

building sharepoint solutions (easy mode)
Tagged on:     

Leave a Reply