Today I would like to share another mini tip about Business Central, how to change the default directory path where reference symbol packages are located in VS Code.
As you might know, when we started developing the Business Central project, we first need to connect to the development environment and download the symbol file.
Basic flow: Start VS Code -> Run AL Go! -> Create a new extension -> Modify launch.json -> Download the symbols
Command: AL: Download symbols
The download is successful.
And the symbol files are automatically saved in . /.alpackages.
In fact, this path can be easily changed.
Let’s see more details.
Open User or Workspace settings and find the associated settings:
Package Cache Path:
In settings.json file:
Sets the directory path where reference symbol packages are located
For example, change default path to “./.symbolfiles“.
At this time, you will be prompted that symbols are missing.
Redownloading symbols, it will point to the new folder.
1. When connecting to the development environment for the first time, such as downloading symbol files, you need to authenticate to the environment.
2. When we build extension (Package/Publish), if there are no symbols, the following error will be prompted.
More details about developing for Dynamics 365 Business Central
MS Docs: Get Started with AL
MS Learn: Get started with development in Microsoft Dynamics 365 Business Central
Update 2023.04.04: Business Central 2023 wave 1 (BC22) new features: Multiple symbol paths (Support for multiple package caches)
Hope this will help.
Thanks for your reading.