Decompile Silverlight project

Recommended for you: Get network issues from WhatsUp Gold. Not end users.

On the Internet, every day there are many Silverlight project release, some open source, some just for show. In the early days of the Silverlight study, most are in need of imitation learning, therefore, to find an Silverlight project, to view the source code is the best. However, Silverlight publishing, just release resource package XAP, and all resources are in the XAP file, how to view the resource and code? Below I will be demonstrating method of decompilation, presentation I will use the Silverlight.Net Silverlight home page as an example.

1 the first open Silverlight.Net, the page contains a Silverlight navigation animation,

2 in the browser, right-click on the page, view the source code,

3 in the HTML source code search " xap", soon will be able to locate the position of the Xap.

We see<param name="Source" value="clientBin/showcasenav/ShowcaseNav.xap" />

The value is the Xap on the server location.

4 we use the same domain, to get the current Xap file. Open a new browser, input at the address bar:  

When the browser will prompt you to download the Xap file.

5 renamed the downloaded file to ShowcaseNav.xap, then extract the compressed to the same directory. The directory, see assembly single file, the Silverlight use, libraries, and configuration files.

6 the following can use all the more familiar anti compiled software, Reflector to view resources and code in the DLL file. Click here to download Reflector

7 in Reflector double click"MsCommunities.Silverlight.ShowcaseNav",Expand file will see DLL and Resources, the Resources contains all the XAML files and image files, are the background code in the DLL class library.

8 click into the Reources directory, Double click"MsCommunities.Silverlight.ShowcaseNav.g.resources", In the right side of the Reflector you can see a list of resources, Select any one want to view the code file, Right click"Save As", Save to local, You can use VS2008 or text editing software to view the code content.

9 corresponds to each resource file will have a class library code, Double click"MsCommunities.Silverlight.ShowcaseNav.dll", Then double click "MsCommunities.Silverlight.ShowcaseNav", can see all the library files, Here, We select " ItemAdvanceControl ", see the decompiled code in Reflector the right to.

So far, we have about how to decompile Silverlight project, check the source code, here I want to introduce a foreign shared software, can also achieve the effect of the above the same - Silverlight SPY, download address:

Silverlight SPY is a sharing software, the software can automatically obtain XAP documents, help you resolve XAP document, the software and Reflector with the same Silverlight can view the project source code. At the same time, the project can be decomposed in style with the UI, Storege and Isolated show the developers. We can get the Silverlight.NET address in the address bar, double-click on any input, a resource in the View window, see the.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download

Posted by Leander at November 05, 2014 - 11:06 AM