Share via


How to Deploy Windows SharePoint Solution Updates (WSP files)

This topic provides guidance on how to use Microsoft Windows PowerShell to deploy updated SharePoint Solution Packages (WSP) to an existing Microsoft SharePoint 2010 site. This deployment scenario assumes that previous WSP files must be replaced with a new set of WSP files containing solution updates. To update an existing solution, you deploy the new SharePoint Solution Packages (WSP) files over the existing files. Existing files are overwritten and replaced by the new WSP files.

Prerequisites

  • See Using Windows PowerShell for SharePoint 2010 Commerce Deployment for a list of variables and sample values that may be used in sample scripts provided in this topic.

  • Determine whether the new SharePoint Solution Packages (WSP) contain customizations that require Feature activation in SharePoint 2010. If so, make sure to copy the content of the Web.config file for your application before you proceed with the following procedure.

  • The new solution files are available locally on the Web server where they must be deployed.

To deploy solution updates using Windows PowerShell

To deploy an updated commerce solution, perform the following steps.

  1. Replace existing solution files with updated files. Following is a sample Windows PowerShell script that deploys updates to an existing SharePoint 2010 solution. The script re-deploys the following sample solution files:

    • MicrosoftCommerceWebParts.wsp

    • MicrosoftCommerceSPFoundationStorefrontSite.wsp

    • MicrosoftCommerceBusinessManagement.wsp

    Write-Host "Updating WebPart Solution"
    $WebPartSolutionPath = $PathToSolutionFiles + $SolutionNameWebPart
    Update-SPSolution -Identity "MicrosoftCommerceWebParts.wsp" -LiteralPath $WebPartSolutionPath -GACDeployment
    
    Write-Host "Updating SiteTemplate Solution"
    $SiteTemplateSolutionPath = $PathToSolutionFiles + $SolutionNameSiteTemplate
    Update-SPSolution -Identity " MicrosoftCommerceSPFoundationStorefrontSite.wsp" -LiteralPath $SiteTemplateSolutionPath -GACDeployment
    
    Write-Host "Updating BusinessMgt Solution"
    $BusinessMgtSolutionPath = $PathToSolutionFiles + $SolutionNameBusinessMgt
    Update-SPSolution -Identity "MicrosoftCommerceBusinessManagement.wsp" -LiteralPath $BusinessMgtSolutionPath -GACDeployment
    
  2. Caution   Deactivating and reactivating the Commerce Server Feature in SharePoint 2010 results in the loss of manually applied settings in the Web.config file. If the SharePoint Solution Packages (WSP) you are deploying contain site customizations requiring Features activation in SharePoint 2010, copy the content of the Web.config file so you can paste it back in after you have reactivated the Commerce Feature in SharePoint 2010.

    As required based on the customizations contained in the new SharePoint Solution Packages (WSP), proceed with Feature activation in SharePoint 2010.

  3. Restore the content of the application Web.config file as required.

See Also

Other Resources

Deploying Updates to an Existing SharePoint Commerce Site