Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Restore source code from deployable package

(0) ShareShare
ReportReport
Posted on by 277

Hi.

I have some customizations that I have created into a deployable package and they are deployed with success to both UAT and PROD. Now my DEV box ended up being corrupted and I deleted it and redeployed a new DEV box. I thought that I could just create a DEV box from a point-in-time restore of my UAT, but realized to late that this wasn't the case. I then redeployed a new clean DEV box and copied in data from PROD through this guideline https://docs.microsoft.com/en-us/dynamics365/operations/dev-itpro/database/copy-database-from-azure-sql-to-sql-server which worked perfectly fine. The thing is that I didn't use VSTS for my code, which I know I should have, and now I want to restore the source code. I have deployed the deployable package to the DEV box and this makes the customizations appear and working in the application, but I cannot access the source code in VS. I can see my extension model but I cant edit it and the overlaying models do not appear at all.

Is there anyway I can restore the source code?

Any help is appreciated, thanks.

*This post is locked for comments

  • André Arnaud de Calavon Profile Picture
    292,886 Super User 2025 Season 1 on at
    RE: Restore source code from deployable package

    Hi Dian,

    Sorry to read you had the same experience. I do hope you are now ensuring to have source control in place which can prevent the loss of coding.

  • Community Member Profile Picture
    on at
    RE: Restore source code from deployable package

    Hi Brian,

    Thanks for your quick reply. Although I hoped that you gave good news. But thanks.

  • Refshauge Profile Picture
    277 on at
    RE: Restore source code from deployable package

    Hi Dian.

    Well i did all the code once more and took in the learning.

  • Community Member Profile Picture
    on at
    RE: Restore source code from deployable package

    Hi Brian,

    We faced similar issue and we are running out of option to get back the code. 

    Did you solve this issue? How you overcome the lost codes?

  • Refshauge Profile Picture
    277 on at
    RE: Restore source code from deployable package

    Thanks

  • Verified answer
    Martin Dráb Profile Picture
    231,768 Most Valuable Professional on at
    RE: Restore source code from deployable package

    You would need a third-party tool such as ILSpy, Reflector or JustDecompile. Microsoft provide only a decompiler from binaries to CIL.

  • Refshauge Profile Picture
    277 on at
    RE: Restore source code from deployable package

    Hi Martin.

    Any good documentation for decompile to C# code? Do I need a third party tool or can I do it directly in Visual Studio?

  • Verified answer
    Martin Dráb Profile Picture
    231,768 Most Valuable Professional on at
    RE: Restore source code from deployable package

    Deployable packages don't contain source code; they contained binaries (DLL) created by building the source code. They won't help you.

    If you don't use version control, your only chance is backup. If you don't have any, the files simply don't exist anymore.

    Working without any kind of version control is just a terrible idea; nobody should ever do it. This is just one example of what may happen if you don't manage your source code properly.

    There is a possibility to decompile DLLs to C# to see what you've done there, so you don't have to develop everything from scratch, but you can't extract X++ code and metadata from there.

  • Verified answer
    André Arnaud de Calavon Profile Picture
    292,886 Super User 2025 Season 1 on at
    RE: Restore source code from deployable package

    HI Brian,

    As of today, you have to start using VSO for your source control. A deployable package does NOT contain the source code, only the runtime objects.

    If you have the old VHD, you can try to get the files from the local package directory.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,886 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,768 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans