Wednesday, February 18, 2009

Deploy a WSP without WSPBuilder using STSADM

For SharePoint development I typically use Visual Studio and WSPBuilder to do all my packaging/deployment of my code through .WSP(s). However its important to remmember the procedures for doing it directly through STSADM. At a DOS prompt you want to do the following:

1. Go to the directory where the .WSP file is located.

2. Add the directory containing STSADM to the DOS path.
@set PATH=C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN;%PATH%

3. Add the solution:
stsadm -o addsolution -filename AlexSolution.wsp
stsadm -o execadmsvcjobs

4. Deploy the solution:
stsadm -o deploysolution -name AlexSolution.wsp -immediate -allcontenturls -allowGacDeployment -allowCasPolicies
stsadm -o execadmsvcjobs

5. Activate the feature in the solution:
stsadm -o activatefeature -name AlexFeature -url http://localhost

No comments:

Post a Comment