- Business logic
- application development
- Visual C#
- Visual Studio
- Microsoft Office
- Exchange server
- SharePoint 2010
- document management
- Web development
- Web sites
- Web Parts
- SharePoint Service Account
- SharePoint administration
Developing SharePoint Solutions in Visual Studio Using WSPBuilder
There are many ways to develop solutions for Windows SharePoint Services (WSS) 3.0. However, most serious SharePoint developers will tell you that you need to be developing all your custom code within the feature framework and deploying these as WSP (WSS Solution Package) files. This is the method recommended by Microsoft and appears to be the only way to ensure your customizations are going to be upgradeable to any future versions of SharePoint.
Now there is a lot of information available on how to build a WSP file from scratch and prepare this for deployment on to your SharePoint farm. Its is vital that you have an understanding of this before you continue with this article, so if you do not have a clear understanding then I would recommend the visual how-to guide from MSDN.
WSPBuilder is a command line packaging tool to manage the creation of WSP files for your SharePoint solutions. In the words of its creator:
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.
It will take files stored in a specific folder structure and use these to build a WSP file which will allow your solution to de deployed onto your SharePoint farm in a testable and manageable fashion.
In addition to the core command line tool there is also WSPBuilder Extensions for Visual Studio. This add-in provides some additional menu options to allow for rapid build and deployment of WSP files as well as direct deployment of infrastructure files and assemblies onto your development server. These extra features are incredibly useful and time-saving; I will highlight some of the benefits of these later in the article.
Installing the WSPBuilder Feature project template for Visual Studio 2008
As a part of this article I have provided a downloadable project template for Visual Studio. (Download the source here.) This project template provides the base framework for any SharePoint Solution developed using WSPBuilder and Visual Studio 2008. This project template includes references to:
- A folder structure suitable for most SharePoint development.
- Feature.xml and elements.xml files.
- Pre-configured project settings (public key signed)
- The addition of Project Type GUIDS to support the addition of web objects such as aspx pages and ascx controls.
To install these templates you will need to:
- Close Visual Studio 2008.
- Extract the WSPBuilderVSTemplates.zip file to an appropriate location.
- Copy the appropriate WSPBuilder Feature.zip file from either (or both) of the language folders.
- Paste this to the appropriate language folder in the following (OS specific) location:
- C:\Documents and Settings\USERNAME\My Documents\Visual Studio 2008\Templates\ProjectTemplates (Windows XP/2000)
- C:\Users\USERNAME\Documents\Visual Studio 2008\Templates\ProjectTemplates (Vista)
Creating your first WSPBuilder project
We are going to create a very simple SharePoint feature which deploys a new link to the site actions menu. This is only a very simple feature but it will demonstrate the ease with which you can use this tool to build, test and deploy your SharePoint solutions.
1. Ensure you have the WSPBuilder Extensions installed (this includes WSPBuilder.)
2. Open Visual Studio. Select File >New > Project.
3. Select your language of choice under Project Types.
4. Under My Templates select “WSPBuilder Feature”.
5. Use the following additional settings:
a. Name: MyFirstWSPBuilder
b. Location: C:\MyFirstWSPBuilder
c. Solution Name: MyFirstWSPBuilder
6. The first thing you will notice is that you have been provided with a pre-defined folder structure that is closely aligned with the physical architecture of a SharePoint server.
A Developer.com eBook
Discover how to start developing for the Android platform with this extensive guide, which provides a reference to the Android platform as well as a look at developing your first Android application. You'll explore the top 10 features for developers as well as learn design and development tips that go beyond the phone and target tablet development as well.