Wednesday, March 13, 2013

Deploy Solution v/s Upgrade Solution In SharePoint


STSADM – usage.
SharePoint developers/Administrators often come across a scenario where they have to decide between "deploysolution" and "upgradesolution". Following explanation will help you to decide.When you are deploying a solution for the first time you will use "deploysolution" command.
stsadm –o addsolution
stsadm –o deploysolution 
When you are upgrading an existing solution in that case you can use either "deploysolution" or "upgradesolution" command.
If you go for "deploysolution" in case of already deployed solution, in that case you will have to perform following operations.
stsadm –o retractsolution stsadm –o deletesolution stsadm –o addsolution stsadm –o deploysolution 
In case of "upgradesolution" operation you need to fire only one command.
stsadm –o upgradesolution 
Retract operation will remove the existing files and "deploysolution" will copy the files once again on the front end web servers. If you opt for "upgradesolution" this operation will also perform the same actions, removing and recopying the files.
 
So what's the difference between both the operations? 

• "deploysolution" lets you rename the solution file. If you rename the solution file or change the GUID, "upgradesolution" operation will fail with an error stating that a solution with name or GUID does not exists in solution store. 
• When you deploy a solution and then associated features are also installed but that's not the case with "upgradesolution" operation. If you uninstall the features and then upgrade the solution, it will not install the features. But if you deploy the solution it will install the features again. 
I hope this post gave you clear understanding of "deploysolution" and "upgradesolution" operations. 

No comments:

Post a Comment