How to extract a WSP-Solution from Sharepoint?
Locked
-
Monday, February 09, 2009 8:21 AMHi all
I would like to copy all sharepoint solutions from one sharepoint envrionment to another.
How can I extract the .wsp-solution files from the source sharepoint server?
Kind regards
Alexander
Answers
-
Monday, February 09, 2009 12:45 PM
I think there is no OOTB way to do that, because this files are stored in Config database and there is no way to get them from Central Admin. Nevertheless you can extract them by code:
SPSolutionCollection solutions = SPFarm.Local.Solutions;
foreach (SPSolution solution in solutions)
{
SPPersistedFile wspFile = solution.SolutionFile;
wspFile.SaveAs("c:\\wsp\\" + solution.Name);
}
Blog de Barto Molina
Microsoft MCP 6608632- Marked As Answer by arechsteiner Monday, February 09, 2009 2:46 PM
All Replies
-
Monday, February 09, 2009 12:45 PM
I think there is no OOTB way to do that, because this files are stored in Config database and there is no way to get them from Central Admin. Nevertheless you can extract them by code:
SPSolutionCollection solutions = SPFarm.Local.Solutions;
foreach (SPSolution solution in solutions)
{
SPPersistedFile wspFile = solution.SolutionFile;
wspFile.SaveAs("c:\\wsp\\" + solution.Name);
}
Blog de Barto Molina
Microsoft MCP 6608632- Marked As Answer by arechsteiner Monday, February 09, 2009 2:46 PM
-
Sunday, April 26, 2009 9:13 AMHi,
The easiest is may be to download this tool :
http://www.crsw.com/mark/Lists/Posts/Post.aspx?ID=37
it allows you to download any existing solution. Then just rename your .wsp in .cab, double-click and extract manifest.xml.
Best Regards -
Sunday, March 20, 2011 6:17 PM
Hi Alexander,
If you don't want to write a custom executable to do this, take a look at the following link that shows the PowerShell required:
http://www.sharepointbleached.com/2011/03/extract-wsp-solutions-from-sharepoint.html
Regards
Ben

