Microsoft supports Side-by-Side development for C/AL and AL. To start using the Side-by-Side development make sure you have the latest version of AdvaniaGIT add-in for Visual Studio Code and update the PowerShell scripts by using the “Advania: Go!” command.
When the Business Central environment is built use the “Advania: Build C/AL Symbol References for AL” to enable the Side-by-Side development for this environment. This function will reconfigure the service and execute the Generate Symbol References command for the environment. From here on everything you change in C/AL on this environment will update the AL Symbol References.
So let’s try this out.
I converted my C/AL project to AL project with the steps described in my previous post. Then selected to open Visual Studio Code in AL folder.
In my new Visual Studio Code window I selected to build an environment – the Docker Container.
When AdvaniaGIT builds a container it will install the AL Extension for Visual Studio Code from that Container. We need to read the output of the environment build. In this example I am asked to restart Visual Studio Code before reinstalling AL Language. Note that if you are not asked to restart Visual Studio Code you don’t need to do that.
After restart I can see that the AL Language extension for Visual Studio Code is missing.
To fix this I execute the “Advania: Build NAV Environment” command again. This time, since the Container is already running only the NAV license and the AL Extension will be updated.
Restart Visual Studio Code again and we are ready to go.
If we build new environment for our AL project we must update the environment settings in .vscode\launch.json. This we can do with a built in AdvaniaGIT command.
We can verify the environment by executing “Advania: Check NAV Environment”. Everything should be up and running at this time.
Since we will be using Side-by-Side development for C/AL and AL in this environment we need to enable that by executing “Advania: Build C/AL Symbol References for AL”.
This will take a few minutes to execute.
Don’t worry about the warning. AdvaniaGIT takes care of restarting the service. Let’s download AL Symbols and see what happens.
We can see that AL now recognizes the standard symbols but my custom one; “IS Soap Proxy Client Mgt.” is not recognized. I will tell you more about this Codeunit in my next blog post.
I start FinSql to import the Codeunit “IS Soap Proxy Client Mgt.”
Import the FOB file
Close FinSql and execute the “AL: Download Symbols” again. We can now see that AL recognizes my C/AL Codeunit.
Now I am good to go.
2 Replies to “C/AL and AL Side-by-Side Development with AdvaniaGIT”