Click to Rate and Give Feedback
MSDN
MSDN Library
Web Development
SDK Documentation
General Reference
 Upgrading a Solution

  Switch on low bandwidth view
Community Content
In this section
Statistics Annotations (0)
Upgrading a Solution

Upgrading a solution involves replacing a previous version of a solution with a current version of the solution. Specifically, an upgrade occurs when a solution is deployed that shares a solution ID with another solution.

During upgrade, files that are associated with the previous version of a solution are removed, and files contained in the current version are added.

Each time a solution is successfully upgraded, the previous version of the solution is backed up and stored in the configuration store. This backup is used by the solution framework in the case of an upgrade failure. Only a single backup copy is stored per solution.

Solution upgrade can only be used to replace files. You can add new files in a solution upgrade and remove old versions of the files, but you cannot install Features or use Feature event handlers to run code for Feature installation and activation. The following operations are not supported in solution upgrade.

  • Removing old Features in a new version of a solution.

  • Adding new Features in a solution upgrade.

  • Updating or changing the receiver assembly for existing Features in a new version of a solution.

  • Adding or changing Feature elements (Element.xml files) in a new version of a solution.

  • Adding or changing Feature properties in a new version of a solution.

  • Changing the ID or scope of old Features in a new version of a solution.

  • Removing Feature elements (Element.xml files) in a new version of a solution.

  • Removing Feature properties in a new version of a solution.

Running Upgrade

For a solution upgrade to run, the solution must be present in the solution store. It may or may not already be deployed; the following rules apply based on whether the solution is deployed.

If the solution is not deployed:

If the solution is deployed:

  • Use the Microsoft.SharePoint.Administration.SPSolution.Upgrade(System.String,System.DateTime) method to start the timer job for upgrade. A backup of the original solution is created.

  • Do not call the Microsoft.SharePoint.Administration.SPSolution.Upgrade(System.String) method. It results in an error because you must specify a time to run the upgrade when a solution is currently deployed.

Upgrade and Language Packs

Solution language packs are handled separately from core solutions during upgrade. An administrator can upgrade a core solution without upgrading the language packs, or upgrade the language packs without upgrading the core solution.

See Also

Other Resources

Deploying a Solution

Community Content   What is Community Content?
Add new content RSS  Annotations
Upgrades are also available via stsadm      Cory Foy   |   Edit   |   Show History
Note that you can also use stsadm -upgradesolution if you don't want to use the object model to upgrade the solution
Anotehr interesting article on this topic      Julien Bakmezdjian   |   Edit   |   Show History
Also see this other article http://msdn.microsoft.com/en-us/library/dd206953.aspx that describes all possibles scenarios.
Tags What's this?: Add a tag
Flag as ContentBug
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker