Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I know it is possible to decompile SharePoint web parts if you have their .dll or .wsp files (I have successfully done this myself using tools like DotPeek or this method), but what if you are left with just a ".webpart" file? Renaming it to a .zip doesn't work, and it's not a supported file type in a decompiler either. Is there any way to resurrect the source from these?

share|improve this question
1  
And, you don't really have to "decompile" wsp files. They're just cab files. Just add the .cab extension to the file name, and open with windows explorer. –  Mike2500 Apr 26 '13 at 19:28
    
I didn't specifically say I was "decompiling" .wsp, I linked to the method that will extract the files inside it. I said decompiling was for .dll. –  Alex Apr 26 '13 at 20:27
add comment

1 Answer 1

up vote 4 down vote accepted

.webpart files are XML.

Open it with Notepad or your favorite XML editor.

See Web Part Properties - part 3 - the .webpart file by Wictor Wilen for an example.

share|improve this answer
2  
And since its just an XML file that describes it, there is no actual code to review/change. –  Mike Oryszak Apr 26 '13 at 19:36
    
Thanks, I was able to see the contents now, but it doesn't really help me in actually modifying the web part itself. I guess I need to track down the .wsp or .dll. –  Alex Apr 26 '13 at 20:30
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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