search blog
most popular
MCP MCTS MCT MVP

WSPBuilder - Walkthrough of the Visual Studio Add-in 

Author: Tobias Zimmergren
http://www.zimmergren.net

Introduction

Alright. People have approached me lately and asked me if I could give them a brief introduction to the WSPBuilder extensions available for Visual Studio. Instead of taking all those discussions on one by one, I've decided to document some of the main features here. If I'm missing out on something, please let me know and I'll fill it up.

Bil Simser did a survey with the SharePoint MVP's and summarized the foremost favorite CodePlex projects in this article. 

In this article I will cover one of my favorite tools - WSPBuilder.

WSPBuilder background

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

Carsten Keutmann, an MVP and friend in Copenhagen is the brilliant mind behind this awesome application.

The idea behind the WSPBuilder add-in for Visual Studio is that it's based on any normal "Class library" template - which means that you can easily copy your entire WSPBuilder project to a machine that doesn't have WSPBuilder and still be able to open the project. - This is something you can't do with a lot of other extension tools (say, the VSeWSS for example)

WSPBuilder Installation

Just download the latest release of the "WSPBuilder Extensions - Visual Studio Addin" and let the installation guide take you through the most simple process ever - clickety click.

Creating a WSPBuilder project

When you have installed the add-in to Visual Studio, you should now be able to create a new project based on the "WSPBuilder" template.

To kick this off, let's create our WSPBuilder project:
image

Note: You don't have to create a WSPBuilder template, you can create a normal Class Library as well. The only thing about a WSPBuilder template is that it will automatically create the "12" folder along with a temporary strong-key so you don't have to do that right now.

When you've created the project, you'll see a structure like this one in your solution explorer:
 image

The WSPBuilder will create the 12-folder, since it's good practice to start your projects from the 12-root. It will also add the file "solutionid.txt" which contains a GUID to be used on the .wsp package, for easy reference. You will also get a strong-key generated for you so you don't have to worry about signing your project right now.

Alright, now that we're up and running with a blank WSPBuilder project - we should start by adding something to the solution.

WSPBuilder Templates - Overview

In an ordinary fashion, right click on the project and choose Add - New item.
image

Choose the "WSPBuilder" node and you will see an overview over the available templates like this:
image

Let's walk through each and every one of them! The joy! :-)

Blank Feature Template Overview

A blank feature does exactly what the name implies, it creates a blank feature for you!

I'm creating a blank feature, and naming it to "BlankFeature1" so we easily can distinguish it from the other folders created later on.

With WSPBuilder, when you create a new item based on a template, you'll get a dialog asking you for some variables - and since this is a feature, it's going to need a Title, Description and of course a Scope:
image

Your solution tree will be populated with a few new things, in this case the BlankFeature1 that we chose to create:
image

As you will see, you get not only the perfectly correct 12-hive structure - you will also get the feature.xml and elements.xml files created for you, and the feature.xml file can look like this:

<?xml version="1.0" encoding="utf-8"?>
<Feature  Id="8e039720-d7df-460a-8d65-c52e47417fdf"
          Title="BlankFeature1"
          Description="Awesome description for BlankFeature1"
          Version="12.0.0.0"
          Hidden="FALSE"
          Scope="Web"
          DefaultResourceFile="core"
          xmlns="http://schemas.microsoft.com/sharepoint/">
  <ElementManifests>
    <ElementManifest Location="elements.xml"/>   
  </ElementManifests>
</Feature>

Event Handler Template Overview

With the Event Handler item template, you will not only get the correct 12-structure in your solution - you will also get the reference to "Microsoft.SharePoint.dll" added automatically, since an event handler requires some talking to the SharePoint Object Model.

We will get our feature.xml and elements.xml as normal - but this time the elements.xml is pre-populated with some tags to hook up our event handler:

<?xml version="1.0" encoding="utf-8" ?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <Receivers ListTemplateId="100">
    <Receiver>
      <Name>AddingEventHandler</Name>
      <Type>ItemAdding</Type>
      <SequenceNumber>10000</SequenceNumber>
      <Assembly>Zimmergren.SharePoint.Demo.WSPBuilder, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b7201b5590fd1fc0</Assembly>
      <Class>Zimmergren.SharePoint.Demo.WSPBuilder.EventHandler1</Class>
      <Data></Data>
      <Filter></Filter>
    </Receiver>
  </Receivers>
</Elements>

As you can see, the elements.xml file is referring to the assembly called Zimmergren.SharePoint.Demo.WSPBuilder and a class called EventHandler1.

With the magic of WSPBuilder, this class has of course also been created for us and will look something similar to this:

using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.SharePoint;

namespace Zimmergren.SharePoint.Demo.WSPBuilder
{
    class EventHandler1 : SPItemEventReceiver
    {
        public override void ItemAdded(SPItemEventProperties properties)
        {
            base.ItemAdded(properties);
        } 

        public override void ItemAdding(SPItemEventProperties properties)
        {
            base.ItemAdding(properties);
        } 

        public override void ItemUpdated(SPItemEventProperties properties)
        {
            base.ItemUpdated(properties);
        } 

        public override void ItemUpdating(SPItemEventProperties properties)
        {
            base.ItemUpdating(properties);
        } 
    }
}



Solution Installer Configuration

If you've ever used the SharePoint Installer from CodePlex, you know that when you want to use it with your own .wsp file you need to do some adjustments to the configuration xml.

With the Solution Installer Configuration template you will get this configuration automatically created and hooked up with your project. The Setup.exe.config file might look like this:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <appSettings>
    <add key="BannerImage" value="Default"/>
    <add key="LogoImage" value="None"/>
    <add key="EULA" value="EULA.rtf"/>
    <add key="SolutionId" value="6e23b11d-8460-49a0-b2f1-b8aa78d7c58d"/>
    <add key="FarmFeatureId" value="bb1586eb-3427-483b-baa5-ae5498c47d69"/>
    <add key="SolutionFile" value="Zimmergren.SharePoint.Demo.WSPBuilder.wsp"/>
    <add key="SolutionTitle" value="Zimmergren.SharePoint.Demo.WSPBuilder"/>
    <add key="SolutionVersion" value="1.0.0.0"/>
    <add key="UpgradeDescription" value="Upgrades {SolutionTitle} on all frontend web servers in the SharePoint farm."/>
    <add key="RequireDeploymentToCentralAdminWebApplication" value="true"/>
    <add key="RequireDeploymentToAllContentWebApplications" value="false"/>   
  </appSettings>
</configuration>



Web Part Feature

This is by far one of the most popular templates, as it crates a generic template for your web part and also creates the feature for provisioning the Web Part to the Web Part Gallery.

You will get the elements.xml file configured something like this:

<?xml version="1.0" encoding="utf-8" ?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <Module Name="WebPartPopulation" Url="_catalogs/wp" RootWebOnly="TRUE">
    <File Url="WebPartFeature1.webpart" Type="GhostableInLibrary">
      <Property Name="Group" Value="MyGroup"></Property>
      <Property Name="QuickAddGroups" Value="MyGroup" />
    </File>
  </Module>
</Elements>

and you'll get the required .webpart file configured something like this:

<?xml version="1.0" encoding="utf-8" ?>
<webParts>
  <webPart xmlns="http://schemas.microsoft.com/WebPart/v3">
    <metaData>
      <type
        name="Zimmergren.SharePoint.Demo.WSPBuilder.WebPartFeature1,
        Zimmergren.SharePoint.Demo.WSPBuilder,
        Version=1.0.0.0,
        Culture=neutral,
        PublicKeyToken=b7201b5590fd1fc0" />
      <importErrorMessage>
            Cannot import WebPartFeature1 Web Part.
      </importErrorMessage>
    </metaData>
    <data>
      <properties>
        <property name="Title" type="string">WebPartFeature1</property>
        <property name="Description" type="string">
            Description for WebPartFeature1
        </property>
      </properties>
    </data>
  </webPart>
</webParts>

and you will get the WebPartFeature1.cs file created automatically (or whatever you choose to name it) and it usually look like this:

using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Web.UI;
using System.Web.UI.WebControls.WebParts;

namespace Zimmergren.SharePoint.Demo.WSPBuilder
{
    [Guid("a043d73d-7418-4918-baed-828a2bc77019")]
    public class WebPartFeature1 : Microsoft.SharePoint.WebPartPages.WebPart
    {
        private bool _error = false;
        private string _myProperty = null; 

        [Personalizable(PersonalizationScope.Shared)]
        [WebBrowsable(true)]
        [System.ComponentModel.Category("My Property Group")]
        [WebDisplayName("MyProperty")]
        [WebDescription("Meaningless Property")]
        public string MyProperty
        {
            get
            {
                if (_myProperty == null)
                {
                    _myProperty = "Hello SharePoint";
                }
                return _myProperty;
            }
            set { _myProperty = value; }
        } 

        public WebPartFeature1()
        {
            this.ExportMode = WebPartExportMode.All;
        } 

        /// <summary>
        /// Create all your controls here for rendering.
        /// Try to avoid using the RenderWebPart() method.
        /// </summary>
        protected override void CreateChildControls()
        {
            if (!_error)
            {
                try
                { 

                    base.CreateChildControls(); 

                    // Your code here...
                    this.Controls.Add(new LiteralControl(this.MyProperty));
                }
                catch (Exception ex)
                {
                    HandleException(ex);
                }
            }
        } 

        /// <summary>
        /// Ensures that the CreateChildControls() is called before events.
        /// Use CreateChildControls() to create your controls.
        /// </summary>
        /// <param name="e"></param>
        protected override void OnLoad(EventArgs e)
        {
            if (!_error)
            {
                try
                {
                    base.OnLoad(e);
                    this.EnsureChildControls(); 

                    // Your code here...
                }
                catch (Exception ex)
                {
                    HandleException(ex);
                }
            }
        } 

        /// <summary>
        /// Clear all child controls and add an error message for display.
        /// </summary>
        /// <param name="ex"></param>
        private void HandleException(Exception ex)
        {
            this._error = true;
            this.Controls.Clear();
            this.Controls.Add(new LiteralControl(ex.Message));
        }
    }
}



Web Service Template

The following files will be automatically created for you:

  • 12\LAYOUTS\WebService1.asmx
  • WebServiceCode\WebService1.cs

WebService1.asmx may look like this:

<%@ WebService Language="C#"
Class="Zimmergren.SharePoint.Demo.WSPBuilder.WebService1,
Zimmergren.SharePoint.Demo.WSPBuilder,
Version=1.0.0.0,
Culture=neutral,
PublicKeyToken=b7201b5590fd1fc0"  %>

WebService1.cs may look like this:

using System;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;

namespace Zimmergren.SharePoint.Demo.WSPBuilder
{
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    public class WebService1 : System.Web.Services.WebService
    { 

        public WebService1()
        { 
        } 

        [WebMethod]
        public string HelloWorld()
        {
            return "Hello World";
        } 
    }
}



Custom Field Type Template

The Custom Field Type template will create all the necessary files to get up and going with a Custom Field Control.

The following files will be generated and populated:

  • 12\TEMPLATE\CONTROLTEMPLATES\CustomFieldType1FieldEditor.ascx
  • 12\TEMPLATE\XML\fldtypes_CustomFieldType1.xml
  • FieldTypeCode\CustomFieldType1.cs
  • FieldTypeCode\CustomFieldType1Control.cs
  • FieldTypeCode\CustomFieldType1FieldEditor.cs

The contents in these files are too much to bring up in a single blogpost, so if you're thrilled about seeing what they look like - create your own project and dig in :-)

Feature With Receiver

Does what it says it's supposed to do. Creates a FeatureReceiver and all required files.

  • 12\TEMPLATE\FEATURES\FeatureWithReceiver1\elements.xml
  • 12\TEMPLATE\FEATURES\FeatureWithReceiver1\feature.xml
  • FeatureCode\FeatureWithReceiver1.cs

Feature.xml might look like this:

<?xml version="1.0" encoding="utf-8"?>
<Feature  Id="3e724aaf-c1ed-4a93-ae1c-c6d3f59b2214"
          Title="FeatureWithReceiver1"
          Description="Description for FeatureWithReceiver1"
          Version="12.0.0.0"
          Hidden="FALSE"
          Scope="Web"
          DefaultResourceFile="core"
         ReceiverAssembly="Zimmergren.SharePoint.Demo.WSPBuilder,
         Version=1.0.0.0,
        Culture=neutral,
        PublicKeyToken=b7201b5590fd1fc0"
      ReceiverClass="Zimmergren.SharePoint.Demo.WSPBuilder.FeatureWithReceiver1"
        xmlns="http://schemas.microsoft.com/sharepoint/">
  <ElementManifests>
    <ElementManifest Location="elements.xml"/>
  </ElementManifests>
</Feature>

FeatureWithReceiver1.cs might look like this:

using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.SharePoint;

namespace Zimmergren.SharePoint.Demo.WSPBuilder
{
    class FeatureWithReceiver1 : SPFeatureReceiver
    {
        public override void FeatureActivated(SPFeatureReceiverProperties properties)
        {
            throw new Exception("The method or operation is not implemented.");
        } 

        public override void FeatureDeactivating(SPFeatureReceiverProperties properties)
        {
            throw new Exception("The method or operation is not implemented.");
        } 

        public override void FeatureInstalled(SPFeatureReceiverProperties properties)
        {
            throw new Exception("The method or operation is not implemented.");
        } 

        public override void FeatureUninstalling(SPFeatureReceiverProperties properties)
        {
            throw new Exception("The method or operation is not implemented.");
        }
    }
}

Sequential Workflow Feature and State Machine Workflow Feature Templates

Creates the necessary files to get started with your Sequential Workflow code.

  • 12\TEMPLATE\SequentialWorkflowFeature1\elements.xml
  • 12\TEMPLATE\SequentialWorkflowFeature1\feature.xml
  • WorkflowCode\SequentialWorkflowFeature1.cs
  • WorkflowCode\SequentialWorkflowFeature1.designer.cs

The same routine applies to the State Machine Workflow Feature template.

 

Web Part Without Feature

Finally, you can create a Web Part without the feature - basically just creating the .webpart file and the .cs file.

  • 80\wpcatalog\WebPart1.webpart
  • WebPartCode\WebPart1.cs

Solution tree overview

Since I've been bashing all kinds of templates in here, you'll see that there's a huge tree of files - all automatically created in less than 1 minute.

image

Template Overview Summary

Alright, the templates I've been mentioning before are great to get rolling with a new SharePoint project. But what about deployment of this solution? How do we create our .wsp file, and how do we choose where the files should land (Global Assembly Cache - GAC - or the /bin folder?)

That's what the next section is all about - bringing some clarification to how the WSPBuilder creates your packages.

WSP Creation and Deployment with WSPBuilder

So, when we're satisfied with our awesome project and want to build a .wsp package from it - we can simply choose to right click the project -> WSPBuilder -> Build WSP and it will automatically create the .wsp for us:
image

This will create a .wsp file in your project folder like so:
image

Now, if you want to check the contents of the .wsp package, you simply rename the .wsp file to .cab and open it, like so:
image

Manifest.xml

In the cabinet (.wsp package) you will find the file called Manifest.xml - this is the file that tells SharePoint where to actually deploy the solution - GAC or BIN.

If you don't do any changes at all, this file will look something like this:
image

As you can see, the DeploymentTarget is set to "GlobalAssemblyCache"  and your dll will go into the GAC.

Now, in this particular case we can not deploy to the /bin folder anyway - as we have types in our assembly that MUST go into the GAC (Workflows and EventReceivers are two of those types).

But if we were to have a Web Part project or what not - and we want to deploy it only to the /bin folder, follow along with the next few steps.

Scoping the assembly for BIN instead of GAC (including Code Access Security generation)

Okay. So you don't want it in the GAC, but in your BIN folder instead. That's okay, just follow along with these few simple steps:

  • Remove your /bin/debug folder entirely from your solution (make sure the .dll gets wiped)
  • If the 80-folder in your project root isn't created - create it
    • Create a folder called "bin" folder in the 80 folder
    • Your solution tree should look something similar to this:
      image
    • Right click your project and choose "Properties"
    • Choose the "Build" tab
    • Change the Output path from "bin\Debug" to "80\bin\":
      image

When you build your project now, your .dll should pop into the "80\bin\" folder in your solution tree like this:
image

Ready to Rock - Scoping the assembly for the /bin folder

If we go about building our .WSP package again (right click project - WSPBuilder - Build WSP) and rename the .wsp to .cab and check the manifest.xml file - we should see two things done different:

  • DeploymentTarget is set to WebApplication (any chosen WebApp, e.g. /bin)
    image
  • Some general CAS (Code Access Security) permissions has been automatically added to make your assembly run:
    image

Deployment with WSPBuilder

Okay. So we've created our project, scoped it either for GAC (do nothing) or for /bin (make the changes in the previous section) - and we want to deploy it. What do we do?

  • Right Click the Project -> WSPBuilder -> Deploy
    Your output window will show something like this:
    image

Check your Solution Management in Central Administration under the tab "Operations" and make sure it's successfully deployed:
image

Conclusion and Summary

This post simply walks through some of the more popular features of the WSPBuilder created by my pal Carsten Keutmann in Copenhagen.

If there's any questions or comments - please add them in the comments section below.

Thanks

 
Posted on 8-Apr-09 by Tobias Zimmergren
207 Comments  |  Trackback Url  |  Link to this post | Bookmark this post with:        
Tags: How To, MOSS 2007, WSS 3.0, Tools, Tips
 

Links to this post (Trackbacks/Pingbacks)

Comments

Wednesday, 8 Apr 2009 12:43 by Greg Winthorpe
Holy bible. good overview man. like the fact that wspbuikder downst need to be isntalled to open project. thanks

Wednesday, 8 Apr 2009 04:39 by Peter
good article taking on the features of wsp bulder. have been waiting for a good setp by step for this. thanks you very much

Wednesday, 8 Apr 2009 07:12 by Anders Bratland
Great post Zimmer! Awesome!

Saturday, 11 Apr 2009 01:26 by Dennis Halt
nice voerview of the tool. i use stsdev but will try this one to see as well it seems like i tlooks nice as well

Tuesday, 14 Apr 2009 08:25 by Fred Morrison
The latest WSPBuilder does not create a workflow.xml file for projects of type WSPBuilder Sequential Workflow, which makes the resulting wsp completely useless.

Tuesday, 14 Apr 2009 08:56 by Taswar Bhatti
Thanks for the blog post :)

Wednesday, 15 Apr 2009 08:06 by Niklas Sonesson
Greeeat! Thanks for sharing this fantastisc guide to using this tool. Thanks thanks!

Saturday, 18 Apr 2009 08:52 by Robin Medo
Good overview. needed indeed this. thaaaaanks

Wednesday, 22 Apr 2009 08:29 by ram
Great Post. Thanks

Wednesday, 22 Apr 2009 04:06 by Manuel M
Thanks a lot, best article I've seen so far to start using WSP Builder.

Monday, 27 Apr 2009 10:54 by Alexandros Vathis
Very good article, thanks. Thanks

Tuesday, 28 Apr 2009 02:51 by Dave
When I add a blank feature I don't see the event handler or class that should be generated. Am I missing something? thanks

Tuesday, 28 Apr 2009 10:17 by Jonas
brilliant! thankz for this overview. Credz to you for your world-class blog and to Carsten for doing the tool!

Tuesday, 28 Apr 2009 10:18 by Toobias Zimmergren
Cheers guys! Hope you enjoy the article ;-) Dave: If you choose to base it on the "Event Handler" template instead, it will create the nessecary classes. A blank feature means just that - a blank feature!

Tuesday, 28 Apr 2009 11:50 by Muhanad Omar
Awesome article Tobias!

Wednesday, 29 Apr 2009 12:04 by SAURABH JAIN
HI I AM USING SAME AS YOU HAVE DONE BUT I AM NOT ABLE TO GENERATE THE WSP FILE. KINDLY DO LET ME KNOW THE ISSUE .

Wednesday, 6 May 2009 10:40 by Tobias Zimmergren
Saurabh, if you're not getting any .wsp package - you're not doing the same as I am. Are you sure that the project builds and have the correct structure? :-)

Saturday, 9 May 2009 11:39 by vaibhav jain
Awesome

Friday, 15 May 2009 05:01 by DB
How do we include any custom aspx ( with code behind file), that needs to be copied under _layouts folder.

Wednesday, 20 May 2009 06:35 by vikpri
Thanks for the detailed post.It was very helpful. Have got a question: How can we edit the manifest file? I get an error "Cannot find this file specified in the manifest file:". I have a declaration of the file in feature.xml Inside I need to add the same file declaration in in manifest.xml Thanks

Wednesday, 20 May 2009 06:50 by vikpri
Thanks for the detailed post.It was very helpful. Have got a question: How can we edit the manifest file? I get an error "Cannot find this file specified in the manifest file:". I have a declaration of the file in feature.xml Inside I need to add the same file declaration in in manifest.xml Thanks

Monday, 25 May 2009 10:04 by

Tuesday, 26 May 2009 09:10 by

Tuesday, 26 May 2009 09:02 by

Thursday, 28 May 2009 01:34 by

Wednesday, 3 Jun 2009 12:15 by

Thursday, 4 Jun 2009 11:20 by

Sunday, 7 Jun 2009 08:57 by Tobias Zimmergren
DB: Simply add it to your LAYOUTS-folder in your WSPBuilder project, and it'll automatically be copied to the 12-hive in the LAYOUTS folder when deploying. As for code behind, if you point the .aspx to your assembly and keep the code behind in the .dll you're fine. Google for Application Pages. Cheers.

Tuesday, 9 Jun 2009 01:40 by Gary Fuller
I am using WSS 3. 0 and have no valid references to the 2 Microsoft. Office.Workflow.xxx.dlls. It appears the 2 workflow features are unuseable. Any fixes or workarounds?

Tuesday, 16 Jun 2009 04:21 by Waqar Ali
Sir, i am not getting same files as you, I am using Web part Feature. The WSPBuilder not creating any webservice and when i am deploying project its not creating any .wsp file. I am using latest version of WSPBuilder(64bit) Please help me out from this problem.

Sunday, 21 Jun 2009 03:07 by

Sunday, 28 Jun 2009 09:18 by

Tuesday, 30 Jun 2009 10:03 by Yazid
Excellent overview, it would be nice if they added something for WCF Yaz

Monday, 6 Jul 2009 01:38 by Gregory Hanson
Great overview of the wsp builder tool for vs2008. i like it a lot and now understand a much more than befopre. thanks you

Monday, 6 Jul 2009 05:36 by Confused
Ok, this looks great, but I think its missing one key important piece (unless I missed it). I have a web part already in existence and I want to package them up for deployment. This is my first time ever packaging up something to deploy to a server other than my development server (where all I had to do there was hit F5). So, am I supposed to do Add New Item -> Web Part Feature, leave the default name of WebPartFeature1, let everything get created, THEN delete WebPartFeature1.vb, put my own web part (ThisIsMyWebPart.vb), and rename all references that were WebPartFeature1.vb to ThisIsMyWebPart.vb?

Monday, 6 Jul 2009 05:55 by Confused
Ok, this looks great, but I think its missing one key important piece (unless I missed it). I have a web part already in existence and I want to package them up for deployment. This is my first time ever packaging up something to deploy to a server other than my development server (where all I had to do there was hit F5). So, am I supposed to do Add New Item -> Web Part Feature, leave the default name of WebPartFeature1, let everything get created, THEN delete WebPartFeature1.vb, put my own web part (ThisIsMyWebPart.vb), and rename all references that were WebPartFeature1.vb to ThisIsMyWebPart.vb?

Wednesday, 8 Jul 2009 05:02 by Kalyan
Thank you Tobias so much for this. This page put me at ease using the WSP Builder. Though I wasted a lot of time and was stuck with an issue, once I read this, it gave me a direction to look at and resolve some things.

Wednesday, 8 Jul 2009 10:06 by Confused
Can someone please answer my question? I don't see how the instructions above tell me how to put my already-developed web part into a solution for deployment.

Thursday, 9 Jul 2009 11:41 by Tobias Zimmergren
Confused, you don't see those instructions here as I was describing how you use WSPBuilder with your own development project. If you're looking to package up existing stuff, download the "Console Version" of the WSPBuilder. That will get you in the direction you want. Then you'll just launch the console app and it'll package everything up for you (read the instructions at www.codeplex.com/wspbuilder)

Thursday, 16 Jul 2009 07:52 by Peter Monadjemi
Hard to believe how much hassle WSPBuilder saves you. And thanks a lot for this Walk through which explains a lot. One question though: Has anyone tested the extension with a non English version of VS 2008? I see all the templates but not the menu exentions in the project context menu. kind regards, peter

Monday, 20 Jul 2009 09:01 by SPDeveloper
Im having a problem with AfterProperties for SPFieldType.User field which return unexpected result. public class ItemEventReceiver : SPItemEventReceiver { public override void ItemAdded(SPItemEventProperties properties) { SPItemEventDataCollection cListItemAfter = properties.AfterProperties; ... } } the cListItemAfter hash table always contains user field value with either of these values and it keeps changing and not fixed to either one: > 1 > -1;#DOMAIN\Account > 1;#DOMAIN\Account any thoughts on this issue?

Wednesday, 22 Jul 2009 10:07 by

Saturday, 1 Aug 2009 11:38 by DonPotbury
Great Walkthrough! I build the project and added the "Blank" and "Webpart" features. The WSP build and deployed just fine. However I was expecting to see the feature under Site Settings > Site Features. How do I activate? What am I missing? Respectfully, don

Sunday, 2 Aug 2009 05:06 by

Monday, 3 Aug 2009 06:30 by DonPotbury
Hello Again. I discovered what was wrong. Since I set the scope to Web, my features showed up under "Site Administration" not "Site Collection Administration"

Wednesday, 5 Aug 2009 02:22 by

Tuesday, 11 Aug 2009 09:20 by Craig
Nice writeup. What about the 'Item Template' though?

Tuesday, 11 Aug 2009 10:51 by Thomas Williamsson
Bra artikel Tobias. Du överväger inte nya karriärvägar?

Thursday, 20 Aug 2009 09:36 by Saradhi
Wonderful presentation

Tuesday, 25 Aug 2009 05:10 by Mike Komnenous
Great write up. Though I am getting an error when trying to build the wsp. It is a cablib error. Here it is, any thoughts? Could not load file or assembly 'CabLib, Version=10.2.0.0, Culture=neutral, PublicKeyToken=5c838b77b53f84a0' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Tuesday, 25 Aug 2009 07:27 by

Wednesday, 26 Aug 2009 12:27 by Danya
Thanks for the article, I have only one event listener to be deployed on the server. however it looks like the event is not firing , when i tried to attach to worker process it didnt hit the break point

Wednesday, 26 Aug 2009 04:00 by Danya
Thanks for the article, I have only one event listener to be deployed on the server. however it looks like the event is not firing , when i tried to attach to worker process it didnt hit the break point

Sunday, 30 Aug 2009 01:17 by

Monday, 31 Aug 2009 09:38 by Gregory Thompson
wow! wow! WOW! thanks hanks thanks thanks. we needed this yesterday, last week or last year. brilliant.. thanks

Sunday, 13 Sep 2009 03:56 by

Friday, 18 Sep 2009 06:38 by

Friday, 18 Sep 2009 10:16 by Biju
Hi, I have developed an event handler,called TaskListEventHandler, for the Task list ((ItemAdding, ItemDeleting, ItemUpdating) as feasture using the WSP Builder project template, and I have also added a web part, called RegisterEventHandler, which will be used to bind(register) the events to a list. The webpart is WSP Builder template "Webpart without feature". Now i moved the .webpart file from the 80/wpcatalog to the Feature folder and updated the elements.xml and the feature.xml with the reference to the .webpart file Now i do build->WSPBuild ->CreateDeploymentfolder using the WSPBuilder. After deployment, the feature and webpart are getting deployed sucessfully, But I had set the grouping for the webpart but it is not grouping,and even it is not getting populated automatically i need to populate it. I tried using the .wsp file (generated through WSPBuilder Deployment)and deployed it on the server using the stsadm command, and the grouping of the webpart works fine. It is strange that the WSPBuilder is not able to do it Could you please give me a solution. With regards Biju

Tuesday, 29 Sep 2009 08:41 by William Thompson
Hi Tobias. I really enjoyed reading this fine walkthrough - you've done a splendid job on keeping things real in your blog - keep it up. We love it

Thursday, 1 Oct 2009 08:04 by John
great great great great great!!!!

Monday, 5 Oct 2009 05:35 by

Tuesday, 6 Oct 2009 08:44 by Erin Giffin
I've installed WSPBuilder but the project for which I am trying to create a wsp for was not created with a WSPBuilder template. I added the strong name key manually and added the public key generated to the feature.xml file. When I right click on the project and select WSPBuilder->Build WSP, the manifest.xml file created does not include the SafeControl node. Do I need to use the WSPBuilder project template for this to work? If not, does the snk filename/path need to be something specific? I named it .snk and it is located in the project root directory. Thanks, Erin

Monday, 12 Oct 2009 03:23 by

Tuesday, 20 Oct 2009 05:18 by Julia Wilson
Thanks for this article - I have got a small hello world webpart in sharepoint fine but when I preview it I get the following error message - I am sure this is pretty basic, but I wonder if you can help? A Web Part or Web Form Control on this Page cannot be displayed or imported. The type could not be found or it is not registered as safe. at Microsoft.SharePoint.WebPartPages.WebPartImporter.CreateWebPart(Boolean clearConnections) at Microsoft.SharePoint.WebPartPages.WebPartImporter.Import(SPWebPartManager manager, XmlReader reader, Boolean clearConnections, Uri webPartPageUri, SPWeb spWeb) at Microsoft.SharePoint.WebPartPages.WebPartPreview.get_WebPart() at Microsoft.SharePoint.WebPartPages.WebPartPreview.CreateChildControls() at System.Web.UI.Control.EnsureChildControls() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) Thanks for any help Julia Wilson

Thursday, 22 Oct 2009 09:58 by

Thursday, 22 Oct 2009 12:57 by No_limits99
The savings were both man-hours and the construction of the iron prototype. ,

Saturday, 24 Oct 2009 06:06 by Madhur
thx for this article. saves a lot of time. thx for las vegas saying hello

Tuesday, 27 Oct 2009 07:09 by smith
thanks for the walk through, it made my life very easy thanks smith

Saturday, 31 Oct 2009 04:16 by

Thursday, 5 Nov 2009 01:50 by Tracy
DonPotbury, Thank-you for sharing your solution to 'the missing site collection feature' - I've been pounding my head against the wall for almost an hour now over that one! -Tracy

Tuesday, 10 Nov 2009 02:59 by Lucky M.
I've installed wspbuilder and it installed properly. the problem is when I right click the project i cant get the WSP options. I'm using VS2008 with visual studio moss extensions installed. HELP!!!

Friday, 13 Nov 2009 08:54 by Richard Tony
saved my life

Monday, 16 Nov 2009 06:29 by cumark
i have also used the above steps and was able to generate wsp file. However I am trying to put the wspbuilder command in tfsbuild.proj file but it fails to generate the file. There is no error, it generates a 1 KB wsp file. Here;s the command that I used

Wednesday, 2 Dec 2009 04:37 by

Wednesday, 9 Dec 2009 07:35 by

Saturday, 19 Dec 2009 07:33 by

Sunday, 20 Dec 2009 12:56 by

Friday, 25 Dec 2009 08:54 by

Tuesday, 29 Dec 2009 05:26 by Calvin
Amazing work! Thank you!

Thursday, 7 Jan 2010 10:58 by sahil
excellant work!!!

Tuesday, 12 Jan 2010 11:01 by

Tuesday, 19 Jan 2010 07:26 by

Wednesday, 20 Jan 2010 02:04 by Tanmaya Mishra
it's awesome.can you add steps for include Side Definition and Site Template in the wsp file

Wednesday, 20 Jan 2010 02:07 by Tanmaya Mishra
it's awesome.can you add steps for include Side Definition and Site Template in the wsp file

Friday, 22 Jan 2010 11:22 by

Wednesday, 27 Jan 2010 11:44 by

Thursday, 28 Jan 2010 12:51 by Rajanikanth
Hi, why should we have the 12 hive folder structure in the project/solution. evern if i create a normal web part project (not wspBuilder project template) and the build it thru wspbuilder and deploy it, it works fine too. whats the difference between these two?

Thursday, 28 Jan 2010 01:25 by Rajanikanth
Hi, why should we have the 12 hive folder structure in the project/solution. evern if i create a normal web part project (not wspBuilder project template) and the build it thru wspbuilder and deploy it, it works fine too. whats the difference between these two?

Friday, 29 Jan 2010 01:11 by new2Sp
Excellent post! Great help to start now.

Saturday, 30 Jan 2010 01:53 by

Wednesday, 3 Feb 2010 01:14 by

Thursday, 4 Feb 2010 01:07 by

Thursday, 4 Feb 2010 07:56 by Amitabh Bacchan
Great article. I have created all the features with elements using feature generator. However, How do I add these to WSPbuilder project?

Friday, 5 Feb 2010 08:33 by Jamil Shahin
Amitabh, Just put the created contents in the same folder of the wsp project 12\template\features. They will not show in the Visual Studio but they will get picked up when you create you deployment package.

Saturday, 6 Feb 2010 09:36 by

Monday, 8 Feb 2010 10:13 by ahermosa
where´s the siteprovisioning.cs file? I need use the method onActivated

Monday, 8 Feb 2010 10:16 by ahermosa
where´s the siteprovisioning.cs file? I need use the method onActivated

Name:
URL:
Email:
Comments: