web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

AL VS Code sometimes does not compile whole solution as it seems

(2) ShareShare
ReportReport
Posted on by 27
Hi all,
 
Some of a mystery i come accross ever so often. It seems like the AL builder does not always compile the whole solution. Sometimes, when i publish my extension to a Business Central environment some code is missing for some reason. First i thought it was human error publishing a wrong branch. But i have proof now that after is published a branch the code is different in the downloaded code of the extension. 
 
A few things i tried to prevent this:
a. i turned off al.incrementalbuild in the workspace
b. i tried clearing the rad.json to publish it first to anoher environment.
 
I have the suspicion that it happens when changing branches a lot. i think this because of my experiences and the fact that the rad.json is not updated because it is in the git ignore. I cannot prove that this is the problem, but loading it again always resolves the issue. both tried solutions are done to convince the compiler to compile everything no questions asked. But in my opinion that is only a solution not a known cause.
 
My question is. Do you guys have the same experience? When does it happen? Can i force the compiler to always do a full build if i want to push stuff for testing? Am i doing something wrong?
 
I have the same question (0)
  • Suggested answer
    Sohail Ahmed Profile Picture
    11,150 Super User 2025 Season 2 on at

    Yes, the issue of the AL compiler sometimes not compiling the whole solution, leading to missing code when publishing extensions, is a known and common problem in AL development within VS Code. This often occurs with frequent branch switching or external file changes, where the incremental build process gets confused. There's no direct "force full build" button, but the most effective workarounds you already apply, such as deleting the .alpackages folder and .vscode/rad.json file before building and publishing, or using "Developer: Reload Window," are necessary steps to force a clean compilation and resolve the issue.

    ✅ Mark this answer as verified if it helps you.

  • JV-15051434-0 Profile Picture
    27 on at
    @Sohail Ahmed why should i throw away the .alpackages? isnt that where all the depencies are stored? Or do you mean throwing away all created .app files of your own app?
     
    Also, if you throw away the rad.json it wont accomplish anything. It will just rebuild the data in the rad.json the way it was after a build. Publishing is the only way to clear it.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,092

#2
YUN ZHU Profile Picture

YUN ZHU 663 Super User 2025 Season 2

#3
Sumit Singh Profile Picture

Sumit Singh 515

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans