Our dev team has developed SharePoint solutions, suddenly the source control is damaged and we don't have back up from the source code - Only the deployed wsp solutions.

Is it possible to reflect the wsp files to source code solution? Any reflector for other approach?

2 Answers 2


try below steps to get the files.

  • First of all, locate the WSP package that needs to be investigated. you can go to Central Application system settings > manage farm solutions and download the required wsp. Youc an use the following code to download it via powershell:

$frm = Get-SPFarm

$file = $frm.Solutions.Item("nameof.wsp").SolutionFile


  • Rename the .wsp to a .cab format.
  • Accept the warning which advises you the file may become unusable
  • Extract the cab contents somewhere to your drive.
  • Browse to the directory and have a look at the extracted files

SharePoint 2010: Reverse Engineering SharePoint WSP Packages


Unfortunately, WSPs contain compiled code, not source code. Of course, if the code in question is javascript, then that is easily obtaintable. For c#, there are a variety of tools, such as ILSpy to decompile the code. Here is a similar question with answers that recommend different tools.

For future reference, both visualstudio.com and github have source code control, and both offer it for free.

edit: as Helb commented, the wsp file is really just a cab file. Change the extention of the wsp to .cab, and then open it with windows explorer. This will give you access to the files that are being deployed, including any js, css, html, etc., files, plus the dll. I'll assume that the decompilers don't know how to read wsp files, so go through this process, and copy the dll to another location, and then use the decompiler from there.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.