Skip to main content
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?
 
  • JV-15051434-0 Profile Picture
    27 on at
    AL VS Code sometimes does not compile whole solution as it seems
    @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.
  • Suggested answer
    Sohail Ahmed Profile Picture
    4,844 on at
    AL VS Code sometimes does not compile whole solution as it seems

    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.

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

News and Announcements

Now Available: 2025 Release Wave 2

Quick Links

Ramesh Kumar – Community Spotlight

We are honored to recognize Ramesh Kumar as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

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

#1
Sohail Ahmed Profile Picture

Sohail Ahmed 2,655

#2
Mansi Soni Profile Picture

Mansi Soni 1,574

#3
YUN ZHU Profile Picture

YUN ZHU 1,453 Super User 2025 Season 1

Featured topics

Product updates

Dynamics 365 release plans