Blog
Blog

Install and Publish Extension in VS Code

Posted on 18-Oct-2018 by Manish Sharma

Step 1:- Things need to do in Services and Config. file before starting VS code.

Enable Developer Service Endpoint and Enable Loading Application Symbol in the Business Central Administration Serivce instance as shown below

Configuring Development Service Endpoint and enabling Application Symbol loading in Business Central Server Instance.

Assign Web client Base URL as mention below.

If you are using local service then mention localhost else mention server IP.

Defining the Web Client Base URL in the Business Central administration panel for local or server environments.

Change “NetFx40_LegacySecurityPolicy enabled” property to false in Server.exe.config file. To change the property follow the below mention path:

C:\Program Files\Microsoft Dynamics 365 Business Central\130\Service\Microsoft.Dynamics.Nav.Server.exe.configOnce all above mention setup has been done restart the service.

Step 2:- Download Visual Studio code.(To download follow the link https://code.visualstudio.com/).

Step 3:- Open Visual Studio , Go to View-Extension

Navigating to the Extensions view in Visual Studio Code to begin Business Central development setup.

Select Install VSIX to install AL extension.

Using the 'Install from VSIX' option in the Visual Studio Code extensions menu.

Select ALLanguage File from path: C:\Program Files (x86)\Microsoft Dynamics 365 Business Central\130\AL Development Environment

Locating and selecting the AL language extension file from the Business Central installation directory

Install the AL Language Extension, from extensions marketplace (Seatch for AL).

The official AL Language extension page in the Visual Studio Code Marketplace with the install button highlighted.

Once the AL Language is installed, Press Shift+Ctrl+P and select Al:Go option.

Executing the AL:Go command in the Visual Studio Code command palette to initialize a new Business Central project.

Once you Select Al:Go it will create a Project under folder : C:\Users\Documents\Al\Project. Press Enter.

Selecting the local project directory for a new Business Central AL extension in Windows File Explorer.

Once the projet is created, select your own Server option

Choosing between Microsoft Cloud Sandbox or a specific local server for the Business Central project environment.

A Launch.json file will be created as mention below

The default launch.json configuration file generated for a new AL project in Visual Studio Code.

You need to change the properties as mention in below image to use your define port of the service which you created.

Editing the launch.json file in VS Code to include specific server names, instances, and authentication modes.

Below are the details you need to change,

Sever :- If you are using local service the type local host else type server address or IP

ServerInstance :- This will be the Service instance for Business Central what has been configured.

Authentication:- If using windows then fill windows, if using NAVUSERPASS then use navuserpass.

Port :- This will be you development port that we have configured in the service configuration.

Step 5:- Press Shift+Ctrl+P and select Al:Download Symbols

Running the 'AL: Download Symbols' command in Visual Studio Code to fetch required application metadata from the server.

Once Symbols download press Crtl+F5 to publish the project.

For more details on setting up the AL development environment, installing extensions, and creating projects, see our AL Development Guide for Business Central .

Share


Post a Comment

Your email address will not be published. Required fields are marked (*)

Captcha
can't read? refresh

WhatsApp Now