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

Announcements

No record found.

News and Announcements icon
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,169 Super User 2026 Season 1 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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,005 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,148 Super User 2026 Season 1

#3
Khushbu Rajvi. Profile Picture

Khushbu Rajvi. 557 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans