How-to: Decompile your .app file

The other day we found out that some part of one of our extensions was not uploaded to our source code repository and no local version was available anymore. But we did have the .app file. I knew from extensions version 1.0 that the extension file, the .navx, was a zipped set of files. The x in .navx is pointing at this as with all office file extensions now a days. You might recall one of my old posts. As per this blog post, but then in reverse order, would I be able to unzip the .app file by changing the file extension to .zip? And subsequently use the Windows Extract All feature? Apparently not:

So, my lazy mind thought: it can't be done this way, and I asked on one of the fora I am taking part in, whether there is another way of decompiling a .app file. Of course, on the Extension Management window there is the feature Download Source:

Indeed this gives you a nicely zipped file set:

But what if I really only have the .app file and nothing more? Bruno Leisibach and Peter Sørensen helped me out. Thanx, guys.

The .app file is indeed a zipped set of files. Whereas my simple trick did not work, just use a program like 7-zip and extract the files. Note however that the format of the files and the project structure is not exactly the same as when using Download Source. The app.json is now a NavxManifest.xml (where do we know this from?).


Download Source is somewhat differently implemented on NAV 2018 and Business Central:

  • On NAV 2018 you can download the source if the extension has been installed on a specific tenant
  • On Business Central it will only work when showMyCode is set to true in your extension and the extension has been built with target set to Internal.