So how to get started quick and easy with development of WSS features?
It is not that bad after all. You can
- Use WSPBuilder as a starting point
- Use an already build WSPBuilder feature as a starting point
For debugging a WebPart see here.
Before you continue you need to install WSPBuilder.
1. WSPBuilder start
- Visual Studio – New Project – WSPBuilder Project

=> This gives you a WSS solution container for adding one or more features to.

- Add New Item – (choose a WSPBuilder item – ie: Web Part Feature – you could name it MyWebpartFeature)

Now select scope:

=> This gives you the \12\TEMPLATE\FEATURES\<MyWebpartFeature>\feature.xml and a
\12\WebPartCode\<MyWebpartFeature>.cs file for adding the code in.

- Add your code.

- Continue with step 1 in 3. Deploy without setup.exe
2. Copy – Paste start
If you start off from a feature build with WSPBuilder then you only need a few steps:
- Copy-Paste the source project.
- Rename the target project name. Search-Replace the target project name.
- Search-Replace the target namespace. Also replace the default namespace in the project properties.
- Change file and directory names: If the project contains webparts:
The directory \12\TEMPLATE\FEATURES\<MyWebpartFeature>
and the file \12\WebPartCode\<MyWebpartFeature>.cs also needs to be renamed. - Continue with step 1 in 3. Deploy without setup.exe
3. Deploy without setup.exe
- Visual Studio – RightClick feature project - Build (= Shift F6)
- Visual Studio – RightClick feature project - WSPBuilder – Build WSP

=> This creates a .cab file called .wsp - Visual Studio – RightClick feature project - WSPBuilder – Deploy
- Site (collection) – Site Actions – Site Settings – Site (Collection) features – Activate
- Use the feature ie. add the web Part to a page and modify its properties
4. Deploying changes without setup.exe
Following deployment of already deployed feature. This is when you want to test a change of your feature:
- Visual Studio – RightClick feature project - Build (= Shift F6)
- Visual Studio – RightClick feature project - WSPBuilder – Copy2Gac (Or do IISReset and Copy)
- Refresh (= F5) the .aspx under test
5. Deploy with setup.exe
When you need to deploy to another server:
- Add New Item – WSPBuilder\Solution Installer Configuration
=> This gives you the \12\Deploy\Setup.exe.config - Edit Setup.exe.config: remove line containing key=”FarmFeatureId”
- Optional: Edit \Deploy\EULA.rtf
- Visual Studio – RightClick feature project - Build (= Shift F6)
- Visual Studio – RightClick feature project - WSPBuilder – Build WSP
=> This creates a .cab file called .wsp - Visual Studio – RightClick feature project - WSPBuilder – Create Deployment folder
- Execute \%projectfolder%\bin\deploy\%projectname%\setup.exe on the target server
- Site (collection) – Site Actions – Site Settings – Site (Collection) features – Activate
- Use the feature ie. add the web Part to a page and modify its properties
6. Uninstall a feature
If you have deployed a web part feature that you need to get rid of do:
- Site (collection) – Site Actions – Site settings – Web Part Gallery – delete web part
- Optional: Windows – Assembly – Uninstall (or use GacUtil)
- Visual Studio – RightClick feature project - WSPBuilder – Uninstall (Or use STSADM)
7. Tips
- Don’t change version number of your project, since this is referenced from many files in the project. If needed then do a search and replace for it.
Thanx to Erik Norström for introducing me to WSPBuilder - How can you live without it?
[...] The project is made without WSPBuilder. With WSPBuilder you get a template as a starting point and deployment facilities are included in the project menu. See this article. [...]
Pingback by WSS Dev: A simple feature - Type Custom Action « RaSor’s Blog — October 15, 2008 @ 10:26 am
[...] From WSPBuilder make your Webpart (WP). See here. [...]
Pingback by WSS: HowTo debug a WebPart « RaSor’s Blog — October 24, 2008 @ 7:29 pm
[...] PreRequisite: Install WSPBuilder addon for Visual Studio – Version 2k5 onwards. Quick Start with WSPBuilder here. [...]
Pingback by WSS Dev: WSPBuilder Templates « RaSor’s Blog — October 25, 2008 @ 5:49 pm
[...] WSS: Development – Quick Start with WSPB [...]
Pingback by BarCampCph Nov 2008 Presentation « RaSor’s Blog — November 22, 2008 @ 2:43 pm