- Build your project
- Right click your project and select package
- You can see the .dll file, .wsp file and .pdb file under the bin/debug folder copy those thing and paste the folder which you are going to provide the solution to the client.
- create batch file named 'setup2010.bat' or your wish
- Write the following code
- SET STSADM="c:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\bin\STSADM.EXE"
%STSADM% -o retractsolution -name "solutionname.wsp" -immediate
%STSADM% -o execadmsvcjobs
%STSADM% -o deletesolution -name "solutionname.wsp"
%STSADM% -o execadmsvcjobs
%STSADM% -o addsolution -filename "solutionname.wsp"
%STSADM% -o execadmsvcjobs
%STSADM% -o deploysolution -name "solutionname.wsp" -immediate -allowGacDeployment -allowCasPolicies -force
%STSADM% -o execadmsvcjobs - Here I use the site scope so am not going to all content urls if you use webscope at the time you must be add like following
SET STSADM="c:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\bin\STSADM.EXE"
%STSADM% -o retractsolution -name "solutionname.wsp" -immediate -allcontenturls
%STSADM% -o execadmsvcjobs
%STSADM% -o deletesolution -name "solutionname.wsp"
%STSADM% -o execadmsvcjobs
%STSADM% -o addsolution -filename "solutionname.wsp"
%STSADM% -o execadmsvcjobs
%STSADM% -o deploysolution -name "solutionname.wsp" -immediate -allcontenturls -allowGacDeployment -allowCasPolicies -force
%STSADM% -o execadmsvcjobs
Happy Coding:)