Sunday, October 12, 2008  by Marc Charmois - About Me / Previous Posts / Archives - Home

Choose between the two ways of upgrading a SharePoint solution (.wsp)

There is no question about using or not using a solution (.wsp file) to deploy or upgrade a SharePoint solution. You must use a .wsp.
Anyway, using a .wsp to deploy a solution, there is some points you need to pay attention to :
The way to deploy when upgrading a solution.
There is only one way to deploy the fisrt time, with the stsadm instruction:
  stsadm -o deploysolution ...
But when you want to upgrade a solution there is two ways to do :
  1. With the stsadm instruction stsadm -o upgradesolution
  2. By retracting the solution, removing it, and redeploying it again.

What's the difference ?

  • Renaming your solution in order to make a .wsp versionning
    The second way for instance allow you to rename your solution in the solution store in order to be able to make a versioning of your .wsp.
    With the first way, you will have to keep always the same name for your solution in the solution store.

  • .wsp deployment and feature installation
    Deploying a .wsp make all the features inside to be installed in the farm. Upgrading, not necessary so...
    Asume you deploy a solution. Then you uninstall a feature that was deployed, thus installed with this deployment.
    If you uninstall this feature, it will be NOT reinstalled when upgrading the solution with "upgradesolution" stsadm command.
    However, it will be reinstalled when retracting the solution, removing it, and redeploying it.
Solution files that are shared between several solutions
There is no difference between the two ways of upgrading a solution regarding solution files management. When you upgrade a solution using " upgradesolution" stsadm command, all the files prevously deployed with the solution will be removed, and will be copied again in the required directories if they always are present inside the .wsp. So, what's happenig if two solutions share the same file ?
Asume you have a solution that have deployed a site definition. If you make an other solution to make changes to this site definition and deploy it, the site definitions files will belong to the new soltuion. If you retract and remove this solution, all the site definition files will be removed from your farm !
So you will have to redeploy the first solution to recover your farm originale state.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

Links to this post:

Create a Link

<< Home