WSPBuilder makes the process of building WSP files extremely simple as illustrated in a previous post.  WSPBuilder supports many features including deploying files to the 12 hive as well as deploying assemblies to the GAC or the web application’s bin folder.  To do this, you must structure your project files in a specific way.  Take a look at the following screenshot:

wspbuilder_folderlist

This is a sample WSPBuilder project that I whipped up.  There are 3 folders that you should pay attention to:

  • 12 – This folder represents the SharePoint 12 hive.  For example, in the demo project above, we are deploying two XML files to the FEATURES folder and we are deploying a few files into the LAYOUTS folder.  These files will be pushed out to the 12 hive in their respective folders.  WSPBuilder will also add an appropriate entry to the manifest.xml file for our feature.xml file.
  • 80 – This folder represents the Web Application folder.  You can create the following subfolders in the 80 folder: bin, wpcatalog, and resources.  You should place DLLs in the bin folder, web parts in the wpcatalog folder, and any other files can be placed in the resources folder.  Note that appropriate SafeControl entries will be made unless otherwise specified in the WSPBuilder config file.  Here we are deploying one assembly to the web applications bin folder.
  • GAC – Assemblies placed in the GAC folder will be deployed to the Global Assembly Cache.  This is useful if you have an assembly that needs to be run with full trust.  If your assembly does not require full trust, you should place it into the 80\bin folder so the assembly will run at the trust level specified in the web application’s web.config file.  We are deploying one assembly to the Global Assembly Cache in the above project.

Of course this information just scratches the surface and there is much more you can do with WSPBuilder.  This information should help you begin to under the basic folder structure that WSPBuilder uses to generate WSP files.  I urge you to read the documentation, which can be found in the Documentation subfolder of where you installed WSPBuilder, for more information.

Stay tuned for more on WSPBuilder!

WSPBuilder Folder Structure
Tagged on:     

One thought on “WSPBuilder Folder Structure

Leave a Reply