Sharepoint - How do I Modify Contents of a WSP File?

As far as I know, you can only open the wsp file as a cab and modify the files from there. The downside is that all the code will be compiled into assemblies and there will be no way to extract the code from them.

You could create a new Visual Studio web part project and add the assemblies from the wsp file and see if there are any open facing classes or members that can be accessed and go from there.

Check here for more info on how to extract files from the wsp file:

http://sharepointroot.com/2010/07/07/editing-contents-of-a-wsp-sharepoint/


You cannot simply 'repackage' a WSP, it must be rebuilt. Rename the file from .wsp to .cab and then double-click on it and you should be able to extract everything out of it. Then create a new SharePoint project in Visual Studio and add the items from the cab to the project. The complexity of setting up the new VS project will depend on the complexity of the WSP.

Neither the original source code nor the original VS Project/Solution exists in the WSP.

The best approach is to make every effort to get the original Visual Studio solution and source code from the developer. This is especially true if the changes you need to make to the webpart involve code changes. Not only is the source not in the WSP, but the code was most likely signed with a key you do not have access to, which means that even if you use a tool like Reflector to get the source, you cannot rebuild the library using the original strong name.

This means that every instance of the current webpart in SharePoint will continue to point to the original DLL, regardless of your changes. If you delete the original DLL, all of those webparts will then break.

If you are doing code changes and do not have access to the original project and source, it is very likely that you will have to manually replace every instance of the webpart with the one that refers to your new library.


In order to modify the content of wsp file first you have to unpack it and after necessary changes repack it again.
And in order to do that you need to use some third party tool like this one(download it from end of post, WSPCompression.zip) password of zip file is: www.itnerd.ir
extract or unpack wsp files and vise versa