BC Quick Deploy
BC Quick Deploy increments an AL app version, builds the app, synchronizes translations, builds again, and deploys the resulting per-tenant extension through the Business Central Automation API.
Commands
For 1.0.0.119:
| Command |
Result |
BC Quick Deploy: Build |
1.0.0.120 |
BC Quick Deploy: Patch |
1.0.1.0 |
BC Quick Deploy: Minor |
1.1.0.0 |
BC Quick Deploy: Major |
2.0.0.0 |
Every command performs the same workflow:
- Increment
app.json.
- Run the AL extension's normal
Ctrl+Shift+B build (al.package).
- Run
xliffSync.synchronizeFile.
- Build again.
- Upload and install the generated
.app through the Business Central Automation API.
- Wait for the deployment status.
Requirements
- Business Central SaaS
- AL Language
- XLIFF Sync
- A licensed Business Central user with permissions to use the Automation API and manage extensions
On-premises deployment is not supported because the Automation API can upload per-tenant extensions only to Business Central SaaS.
Microsoft Entra setup
Create a public-client app registration in the target tenant:
- Add the delegated Dynamics 365 Business Central permission for user impersonation.
- Add these Mobile and desktop applications redirect URIs:
https://vscode.dev/redirect
ms-appx-web://Microsoft.AAD.BrokerPlugin/<application-client-id>
- Enable public client flows if required by the tenant policy.
- Grant consent.
- Set VS Code setting
bcQuickDeploy.clientId to the Application (client) ID.
BC Quick Deploy uses VS Code's built-in Microsoft authentication provider. The callback is always
one of the two fixed URIs above; it does not use a random localhost port. On Windows, VS Code normally
uses the native Microsoft broker and therefore selects the ms-appx-web URI. Other flows use
https://vscode.dev/redirect. VS Code routes the callback back to the correct open window and securely
manages the account and token cache.
For example, client ID 3b77b565-6489-42a7-ba4f-6e31d062aefc requires:
ms-appx-web://Microsoft.AAD.BrokerPlugin/3b77b565-6489-42a7-ba4f-6e31d062aefc
deploy.json
Create .vscode/deploy.json in the AL project. It accepts JSON with comments and trailing commas and uses the same configuration shape as launch.json.
{
"version": "0.2.0",
"configurations": [
{
"name": "Dev-1",
"request": "launch",
"type": "al",
"environmentType": "Sandbox",
"environmentName": "Dev",
"tenant": "00000000-0000-0000-0000-000000000000",
"startupCompany": "Test Lager",
"schemaUpdateMode": "ForceSync"
},
{
"name": "Dev-2",
"request": "launch",
"type": "al",
"environmentType": "Sandbox",
"environmentName": "Dev-2",
"tenant": "00000000-0000-0000-0000-000000000000",
"startupCompany": "Test Lager",
"schemaUpdateMode": "Synchronize"
}
],
"compounds": []
}
One configuration is selected automatically. Multiple configurations produce a target picker.
ForceSync maps to Automation API Force Sync; Synchronize and an omitted mode map to Add. Recreate is rejected.
Debugger and browser fields are accepted for launch-file compatibility but are ignored during API deployment.
Failure behavior
The original app.json version is restored after a confirmed build, synchronization, authentication, or deployment failure. If Business Central accepted the upload but the final remote state cannot be determined, the version is kept to avoid deploying the same version twice.
Detailed non-secret diagnostics are written to the BC Quick Deploy output channel.
The BC Quick Deploy progress notification is cancellable. Build completion is determined from the
AL command result, compiler diagnostics, and the generated package. If the AL language server stops
responding entirely, bcQuickDeploy.buildTimeoutSeconds stops the wait instead of leaving the
workflow running forever. bcQuickDeploy.xliffTimeoutSeconds controls the corresponding XLIFF wait.
Cancellation is propagated to Business Central HTTP requests and deployment monitoring.
The extension treats command return values and HTTP outcomes as authoritative. A failed AL command
cannot be accepted merely because an old package exists, unsupported schema modes are rejected, and
an uncertain remote deployment state keeps the incremented version to prevent an unsafe duplicate
deployment.
Development
npm install
npm run check
npm run lint
npm test
npm run build
npm run package
Microsoft references: