Skip to content

Latest commit

 

History

History
76 lines (39 loc) · 4.18 KB

File metadata and controls

76 lines (39 loc) · 4.18 KB

Create a new per-tenant extension (like AL:Go in VS Code) and start developing in VS Code

Prerequisites: A GitHub account, VS Code (with AL, git and PowerShell extensions installed), and Docker installed locally

  1. Navigate to https://github.com/microsoft/AL-Go-PTE, choose Use this template and select Create a new repository.

    Use this template

  2. Enter app1 as repository name, select Public or Private and select Create Repository

    Create a new repository

  3. In your new repository, select Actions -> Show more workflows..., Create a new app -> Run workflow

  4. Enter Name, Publisher, ID range, select Direct Commit and choose Run workflow.

    Create a new app

  5. Wait for the workflow to complete

    Wait for completion

  6. When the workflow is complete, select < > Code in the top bar and see that your repository now contains a folder called app1

    app1

  7. Choose the Code button and copy the https Clone Url (in this picture: https://github.com/freddyk-temp/app1.git)

    Copy Url

  8. Start VS Code, press Ctrl+Shift+P and select Git Clone, paste the clone URL and select a folder in which you want to clone the directory.

    Clone

  9. Open the cloned repository and open the workspace when VS Code asks you (or do it manually)

Note

You can rename the al.code-workspace file to <anothername>.code-workspace to be able to better distinguish the workspaces.

  1. In the .AL-Go folder, choose the localDevEnv.ps1 script and Run the PowerShell script.

    LocalDevEnv

  2. Answer the questions asked about container name, authentication mechanism, credentials and select none for license file. The script might show a dialog asking for permissions to run docker commands, select Yes in this dialog. Wait for completion of the script.

    LocalDevEnv done

  3. In VS Code, press Ctrl+Shift+P and clear the credentials cache.

  4. Open the HelloWorld.al file, modify the string and press F5. Depending on authentication selected VS Code might ask for the credentials you provided earlier.

    Modify Hello World

  5. Login to Business Central, navigate to Customers and your very own Hello World opens up!

    My very own Hello world

  6. Back in VS Code, you will see that in addition to your changes in HelloWorld.al, the launch.json was also modified with the information about the local environment. Stage your changes, commit and sync your changes.

    launch.json

  7. Back on github.com, click Actions and investigate your workflows.

    Actions

  8. When the build is done, click the build and inspect the Build summary

    Build Summary

  9. Inspect the workflow run by choosing the build job, expanding the Run Pipeline section and the Compiling apps subsection

    Inspect


back