AL icon indicating copy to clipboard operation
AL copied to clipboard

AL: Publish extension without building ignores al.compilationOptions

Open ernestasjuska opened this issue 4 months ago • 0 comments

1. Describe the bug

AL: Publish extension without building command always looks for the app file in the AL project folder. However, al.compilationOptions workspace setting allows to change where app files are put after packaging - this is particularly useful when using multi-root workspace with lots of app folders. Image

2. To Reproduce

  1. Create AL app using AL: Go. Delete all *.al files - we will not need them.

  2. Create launch.json file and download symbols.

  3. Create .vscode\settings.json file with this content:

    {
      "al.compilationOptions": {
          "outFolder": "./.output", // in our multi-root workspaces we use ../.output
      },
    }
    
  4. Package app using AL: Package command. App file should be created in .output folder.

  5. Create launch.json configuration for web service debugging.

    {
      "version": "0.2.0",
      "configurations": [
        {
          "name": "Attach: Your own server",
          "type": "al",
          "request": "attach",
          "environmentType": "OnPrem",
          "server": "https://your-server",
          "serverInstance": "BC",
          "authentication": "Windows",
          "tenant": "default",
          "breakOnError": "All",
          "breakOnRecordWrite": "None",
          "enableSqlInformationDebugger": true,
          "enableLongRunningSqlStatements": true,
          "longRunningSqlStatementsThreshold": 500,
          "numberOfSqlStatements": 10,
          "breakOnNext": "WebServiceClient",
        },
      ],
    }
    
  6. Attach to server for debugging using AL: Debug with publishing command.

  7. Use AL: Publish extension without building command to reproduce the error.

3. Expected behavior

AL: Publish extension without building should use app that was packaged to .output folder.

4. Actual behavior

We get this error:

[2025-08-25 12:39:22.03] Sending request to https://dev.softera.lt:7049/bc26dev/dev/metadata?tenant=default
[2025-08-25 12:39:22.43] Debugger will attach to the next session of type WebServiceClient.
[2025-08-25 12:39:25.36] Error: File c:\Users\ernjus\Documents\AL\ALProject58\Default Publisher_ALProject58_1.0.0.0.app does not exist.

5. Versions:

  • AL Language: 15.2.1630495
  • Visual Studio Code: 1.103.2
  • Business Central: 26.1.33404.33876
  • List of Visual Studio Code extensions that you have installed:
    • ms-dynamics-smb.al
  • Operating System:
    • [x] Windows
    • [ ] Linux
    • [ ] MacOS

Final Checklist

Please remember to do the following:

  • [x] Search the issue repository to ensure you are reporting a new issue

  • [x] Reproduce the issue after disabling all extensions except the AL Language extension

  • [x] Simplify your code around the issue to better isolate the problem

ernestasjuska avatar Aug 25 '25 09:08 ernestasjuska