Deployed feature is not getting active

Jul 30, 2009 at 12:49 PM

Hi ,
   Currently, after deploying the feature i could find the feature in the SiteFeatur. The feature is not in a active state.  I tried to add stssdm -o Activatefeature command in the batch file but still it is not getting activated.

The batch file which am using (generated through the WSPBuilder deploy folder) is as follows

REM WSPBuilder generated commands

stsadm -o retractsolution -name "Test.SPTaskListEventHandler.wsp" -immediate stsadm -o execadmsvcjobs stsadm -o deletesolution -name "Test.SPTaskListEventHandler.wsp" stsadm -o execadmsvcjobs stsadm -o addsolution -filename "Test.SPTaskListEventHandler.wsp" stsadm -o execadmsvcjobs stsadm -o deploysolution -name "Test.SPTaskListEventHandler.wsp" -immediate -allowGacDeployment -allowCasPolicies -force stsadm -o execadmsvcjobs REM Activate feature command-- added by me stsadm -o activatefeature -filename CustomizedItemEventReceiver\Feature.xml -url echo "Feature Activated" iisreset pause

Can you please suggest me how to make the feature "Active" while deploying the feature?

With regards



Jul 31, 2009 at 6:29 AM Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals

You cannot vote on your own post
Hi All,

  I tried the code  in the featureinstalled event, and it works fine now
SPWeb web = new SPSite("").OpenWeb();

SPFeatureCollection featureCollect = web.Features;

featureCollect.Add(new Guid("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"), true); //True to force activation

Biju Software Engineer,MCP