Monday, 7 February 2011

SharePoint WebPart Deployment

SharePoint WebPart Solution Package (WSP):


Deploy a web part to the bin directory:

Deploy a web part to GAC:

set url=http://serverName:Port

set wspFilePath= C:\Backups\ProjectName.wsp

CD\

c:

CD c:/Program Files/Common Files/Microsoft Shared/Web Server Extensions/14/BIN

@echo adding the solution to the sharepoint solution store

stsadm -o addsolution -filename %wspFilePath%

@echo deploying the solution to the sharepoint site collection

stsadm -o deploysolution -name "ProjectName.wsp" -url %url% -immediate -allowgac -force

@echo executing so that deployment happens immediately.

stsadm -o execadmsvcjobs

pause

No comments: