Using Microsoft Dynamics 365 Business Central Artifacts to get to the source code of the default apps

A question I get a lot – especially from people that come from C/AL, and only take their first steps into AL – is: How do I get to Microsoft’s source code of the BaseApp (and other)?
Well, there are multiple ways, really. You can download symbols, and unpack the symbols. You can download the DVD and get to the code on the DVD, or…

You can simply download the artifacts

And with “the artifacts”, I mean the artifacts that are used to build your Docker images.
If you’re already building your Docker containers based on the artifacts, you probably already have them on your system! If not, you can still make them available, even without having to use Docker! Let’s see how that goes..
You might have heard about the command “Get-BCArtifactUrl” CmdLet that I pullrequested to the BcContainerHelper. What I tried to achieve is some kind of easier way to get to any version of Business Central: by enlisting all possibilities, and by giving a somewhat easier way to filter them. After many improvements from Freddy, now you have a way to easily get to the url of any BC Artifact that Microsoft makes available.
The module also contains a way to download the artifacts with the “Download-Artifacts” CmdLet. So – you can easily get to the url, and you have a cmdlet to download – let’s do that! (if you haven’t got BcContainerHelper, get it first!):

Download-Artifacts -artifactUrl (Get-BCArtifactUrl) -includePlatform  

It will download the Artifacts to the folder ” C:\bcartifacts.cache” by default (unless you set up another path). In that folder, you’ll find all AL sources. A few examples:

The AL Base App: C:\bcartifacts.cache\sandbox\*version*\platform\Applications\BaseApp\Source

The Test-Apps: C:\bcartifacts.cache\sandbox\*version*\platform\Applications\BaseApp\Test

I always work with the Docker containers, so automatically, I have the sources of the exact versions of BC on my own machine whenever I need it. But if you’re not working with it, or you work with a centralized docker system (so you don’t have anything local) .. now you know an alternative way to get to the sources ;-).

5.00 avg. rating (98% score) - 2 votes

Permanent link to this article:


    • Frédéric Vercaemst on September 30, 2020 at 12:32 pm
    • Reply

    Hi Eric, any known issues (maybe linked to BC 17 is being prepared) when download the insider artifacts (using the correct Sas token)?

    *** Get Artifact Url for Version [16] / Country [w1] / Type [Sandbox]: Latest
    ##[error]The remote server returned an error: (403) Forbidden.

      • waldo on September 30, 2020 at 12:36 pm

      Works for me ? What exact statement do you use?

      • Frédéric Vercaemst on September 30, 2020 at 1:42 pm

      I think I’ve found the cause …

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.