Error occurred in deployment step ‘Activate Features’ Sharepoint 2010

This error cause by Visual Studio’s default deployment step configuration because it use the -local option when deploying…. thats why it dont create timer job to deploy on other server…

You can fix it by creating your own deployment step or use stsadm command and creating a batch file like me.

For more info for creating your own deployment steps:
http://msdn.microsoft.com/en-us/library/ee256698.aspx

You should consider fallowing advices:

1) As farm deployment to multiple servers requires a timer job you will need to pause the deployment steps and wait for the timer job to complete (which will no doubt require a constant poll of the timer job status to check whether it has completed or not)

2) Make sure you account for the timer job completing but the solution failing it’s deployment – replying solely on the timer job status will not be a sure fire way of determining whether the solution has actually deployed succesfully

3) Ensure that the account performing the VS Deloyment has enough rights to create the timer job and deploy cross farm
Resources:
http://www.go4answers.com/Example/error-occurred-deployment-step-32423.aspx

Here is an example deployment cmd

@echo Deploying NSF2010 solution
 
@set PATH=C:\Program Files\Common Files\Microsoft Shared\web server extensions\14\BIN;%PATH%
 
@if "%1"=="" (goto invalidParameters) 
 
stsadm -o deactivatefeature -name NSFBase_NSFBase -url %1 -force
stsadm -o deactivatefeature -name NSFBase_NSFErrorModuleFeature -url %1 -force
 
stsadm -o uninstallfeature -name NSFBase_NSFBase -force
stsadm -o uninstallfeature -name NSFBase_NSFErrorModuleFeature -force
 
stsadm -o retractsolution -name NSFBase.wsp -immediate -url %1
stsadm -o execadmsvcjobs
stsadm -o deletesolution -name NSFBase.wsp -override
 
stsadm -o addsolution -filename NSFBase.wsp
stsadm -o deploysolution -name NSFBase.wsp -immediate -allowgacdeployment -force -url %1
stsadm -o execadmsvcjobs
 
stsadm -o installfeature -name NSFBase_NSFBase -force
stsadm -o installfeature -name NSFBase_NSFErrorModuleFeature -force
 
stsadm -o activatefeature -name NSFBase_NSFBase -url %1
stsadm -o activatefeature -name NSFBase_NSFErrorModuleFeature -url %1
 
@goto endOfBatch
 
:invalidParameters
	@echo Please call with the correct parameters.
	@echo The correct syntax of this command is:
	@echo Deploy [siteurl]	
 
:endOfBatch

Usage:

run cmd  with administrative rights then type

deploy [http://your site url:port]

 

Happy Codding.

Advertisement