Is there any way to get the code from a silverlight publish? My laptop has completely crashed, the only thing if have left from my application, is the published website. Is there a tool or something to get the code from my app?
+7
A:
You can rename the xap to zip, extract it, and use Reflector to pull out the code. It won't recover it exactly or recover the XAML though. As far as I know there's no way to reverse engineer XAML.
Edit: +1 for Shawn for pointing out that the XAML is stored as plaintext resources, so you can recover that too. Not quite sure why it does that, but hey, it's good news :-)
Steven Robbins
2009-10-03 19:15:32
+2
A:
try Silverlight spy. It's a great tool for debugging Silverlight. If you use it in combination with reflector you can view the decompiled code of any running silverlight application.
Btw, here are all features of silverlight spy
Sorskoot
2009-10-03 19:28:27
how can i import my dll's or xap file in silverlight spy?
Jordy
2009-10-03 20:40:01
you can browse to the url where your app is running with silverlight spy, and it will find the xap file.
Sorskoot
2009-10-04 08:03:28
That's allready fixed, but where is the option to decompile my xap-file?
Jordy
2009-10-04 08:49:53
In the explorer panel you can look at the contents of a xap file. after you've selected a dll. goto the view tab on the view panel. You have to have reflector installed.
Sorskoot
2009-10-04 10:08:09
+4
A:
Using reflector you can can all the xaml. Its stored as resources in plain text.
Shawn Wildermuth
2009-10-03 20:08:57
Look at the Resource folder at the bottom of the assembly, and it will have the namespace it in. I you click it you'll see the XAML.
Shawn Wildermuth
2009-10-04 08:39:03