WSPBuilder's Setup.exe not populating the webpart in the gallery, and also grouping not getting set

Sep 22, 2009 at 6:49 AM

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".

Defaultly, when i added the new webpart  into the project, the .webpart file was created under the folder 80/wpcatalog. But  as i wanted the whole project as a singel feature I moved the .webpart file to the Feature/TaskListEventHandler  folder. Now the Feature/TaskListEventHandler  contains 3 files elements.xml, feature.xml and the RegisterEventHandler.webpart.

I edited the elememts.xml as follows

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


the feature.xml as follows,

<?xml version="1.0" encoding="utf-8"?>
<Feature  Id="d0975573-b000-4d0f-bae1-1e9d15761cd0"
          Title="TaskListEventHandler"
          Description="TaskListEventHandler overrides Item Adding,Deleting and Updating event for any task list. To start using the event handler the feature must be registered to the task list. -By Biju(18 Sep 2009)"
          Version="12.0.0.0"
          Hidden="FALSE"
          Scope="Web"
          DefaultResourceFile="core"
          ReceiverAssembly="TaskListEventHandler, Version=1.0.0.0, Culture=neutral, PublicKeyToken=9cfae6f598922b94"
          ReceiverClass="Test.EventHandler.TaskListFeatureHandler"
          xmlns="http://schemas.microsoft.com/sharepoint/">
  <ElementManifests>
    <ElementManifest Location="elements.xml"/>
    <ElementFile Location="RegisterEventHandler.webpart" />
  </ElementManifests>
</Feature>

the RegisterEventHandler.webpart as follows,

<webParts>
  <webPart xmlns="http://schemas.microsoft.com/WebPart/v3">
    <metaData>
      <type name="Test.EventHandler.RegisterEventHandler, TaskListEventHandler, Version=1.0.0.0, Culture=neutral, PublicKeyToken=9cfae6f598922b94" />
      <importErrorMessage>Cannot import RegisterEventHandler Web Part.</importErrorMessage>
    </metaData>
    <data>
      <properties>
        <property name="Title" type="string">RegisterEventHandler</property>
        <property name="Description" type="string">This webpart is used to register or unregister the event handler to the list of type 'Task' list, and also adds the custom fields(which are mandatory for the eventhandler to operate sucessfully) on registering to the list  - By Biju (16 Sep 2009)</property>
      </properties>
    </data>
  </webPart>
</webParts>

Next, i  build the poject using the WSP builder, and later create the deployment folder. When i try to install the feature using the WSPBuilder setup.exe file, the feature is getting deployed sucessfully.The feature and the webpart is getting deployed sucessfully. The web part is available in the web part gallery (SiteSetting-> EditPage-> Add a WebPart).

But the webpart's is not under the specific group which i had set in the elements.xml (currently it is shown under the "Miscellaneous" group) , and also the webpart is not shown(visible/available ) under the root site's web parts Galleries (Site Action->Site Settings->WebParts(Galleries) )

I tried the installing+deploying + activating the feature using the STSADM command(through batch file), it works sucessfully, even the grouping is getting set as per my requirement.

 

Could you please suggest me a solution, how can i get it working using the WSPBuilder's Setup.exe

With Regards

Biju