sharepoint-2010wsp

Generate a WSP package from existing SharePoint 2010 application


I have a running SharePoint 2010 application running and I would like to extract the WSP so I can deploy that application in another server. I have no custom components yet so I'm not yet under Visual Studio. Is it possible to extract the WSP for the web app from central administration?

Many thanks


Solution

  • Yes it is possible to extract the wsp from the CA using the Power shell command.

    Please take a look at this

    To take single wsp backup use this

    $farm = Get-SPFarm
    
    $file = $farm.Solutions.Item(“JDSU.OneStop.wsp”).SolutionFile
    
    $file.SaveAs(“c:\temp\JDSU.OneStop.wsp”)
    

    To take multiple wsp backup use this powershell command

    Start-Transcript "c:\wsp\transcript.txt"
    [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")
    
    $solutions = [Microsoft.SharePoint.Administration.SPFarm]::Local.Solutions;
    foreach ($solution in $solutions) {
    $solution.SolutionFile.SaveAs("c:\wsp\" + $solution.Name);
    }
    Stop-Transcript
    

    Hope this helps