Joseph Michael Pesch
VP Programming

Deploy Visual Studio 2010 Sharepoint 2010 Workflow via .WSP File and STSADM

by 9. June 2011 10:04

NOTE:
Make sure the "Sharepoint 2010 Administration" service is NOT running.
Using execadmsvcjobs to execute in lieu of Timer service running them.
This ensures that the prior steps are complete before running the next.

Generate .WSP file by using the "Package" command from Visual Studio.

Copy .WSP file to somewhere on the Sharepoint server
for this example: "c:\MySpDeployment\MyWorkflow.wsp"
Run command window as Administrator and execute the commands below.

NOTE:
If you are re-installing the workflow you can first fully remove it
by using the Uninstall steps shown below the Install steps.

INSTALL STEPS

1) Navigate to the BIN where the STSADM.EXE exists
   (so we don't need the full path on all commands)

cd "c:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\BIN"

2) Run all the STSADM commands...
stsadm -o addsolution -filename "MySpDeployment\MyWorkflow.wsp"
stsadm -o deploysolution -name "MyWorkflow.wsp" -immediate -allowgacdeployment -allowcaspolicies
stsadm -o execadmsvcjobs
stsadm -o activatefeature -name "MyWorkflow" -url http://yoursharepointsite

NOTE: 
Last step to activate feature requires exact folder name of feature.
Verify by navigating to the features folder to confirm the folder name.
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\FEATURES

UNINSTALL STEPS

1) Navigate to the BIN where the STSADM.EXE exists
   (so we don't need the full path on all commands)

cd "c:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\BIN"

NOTE: 
First step to deactivate feature requires exact folder name of feature.
Verify by navigating to the features folder to confirm the folder name.
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\FEATURES

2) Run all the STSADM commands...
stsadm -o deactivatefeature -name "MyWorkflow" -url http://devuam
stsadm -o retractsolution -name "MyWorkflow.wsp" -immediate
stsadm -o execadmsvcjobs
stsadm -o deletesolution -name "MyWorkflow.wsp"

Tags:

Sharepoint

Comments are closed