Search code examples
win-universal-appdecompiling

Get the source code of a universal app from debug installation


So I lost the source code from my app, but it's still installed on my tablet.

It's a universal app for Windows 8.1 and I used Visual Studio 2015. It's not in c:\Programmes Files\WindowsApps... because it was installed from Visual Studio.

Is there a way to get the xaml and cs files?

Thanks.


Solution

  • Folder where application installed usually is C:\Program Files\WindowsApps

    Read this manual to get access to this folder.
    I was able to get HTML and JS code of my application.

    When I start my application and trying to get installed location with code like:

      var package = Windows.ApplicationModel.Package.Current;
      var installedLocation = package.InstalledLocation;
    

    I'am getting folder inside my project folder. So, if you have run your app from Visual Studio it should be installed inside project folder.

    Even if you find folder, probably you will need decompiler to view code.
    And even decompiler might not help you. I have tried Telerik JustDecompile and JetBrains DotPeek without result. Store App is not like .Net app. So, If your app is compiled to native you can probably decompile, but not on 100% and it would be not very easy