How to open .xap extension?

Category: windows phone apphub_ja


Nuha_IT on Tue, 09 Oct 2012 14:36:08


I have a file with .xap extension, I am looking for a way to open the source code of this file?

Is there any way to see the source code? so I can easily modify it?

Please Help!


mltiede on Tue, 09 Oct 2012 14:49:35

Rename it to zip, make changes in the zip, then rename it back.

PaulLinton on Tue, 09 Oct 2012 17:51:03

A xap file does not have source code, it contains executables.  As mentioned, you can rename it to .zip to view the contents.  You could then use a tool like Reflector or dotPeek to investigate the executables.

Mr.Weera PongPruchya on Wed, 10 Oct 2012 01:24:24


Use this tool to view the code.


mltiede on Wed, 10 Oct 2012 09:42:33

OH, by "source code", did you think there was actual source code in there?  That is not what goes in a xap.  Otherwise, you wouldn't be compiling to create the xap.

I assumed by "source code" you meant the things that were in there, like config files or other files, but not the application source.  As others have mentioned, from the IL in the assemblies that ARE in there, you can get a sort of look at source code in various languages using Reflector, for instance, but that is just a translation of the IL, not the original source.  And if the file is obfuscated, Reflector isn't much help.

What are you really trying to do?  Why are you trying to change something in the xap?

Nuha_IT on Wed, 10 Oct 2012 10:02:45

I have a .xap file map, which I am trying to open it by Expression Blend so I would be able to modify the map upon my spcifications.

I tried to change the extension but I only got the .dll files, and the map was available as a tool only, not my whole project of map which was created before.

mltiede on Wed, 10 Oct 2012 10:15:22

I don't know what a ".xap file map" is, nor a "project of map".

I'm not sure how you "only got the .dll files".  If there are only .dll files in the xap, then that is all you will see.  Or are you "looking" at the contents through some tool like Blend which maybe only shows .dlls.  If you are looking at it through the file system, then that is all there is.