You are on page 1of 11

Visual Studio code configuration to NAV 2018

After installing Dynamics NAV 2018, I want to configure Visual Studio Code with Dynamics NAV to
use new Development tool.

Before we start lets verify few things and update accordingly.

You can download VS Code from here: - https://code.visualstudio.com/download


Install and Launch the Visual Studio Code.

Now Click View -> Extensions.


Visual Studio code configuration to NAV 2018

Click on … to open the extension menu.

Click on Install from VSIX


Visual Studio code configuration to NAV 2018

You can find VSIX file on the installation medium path:

“ModernDev\program files\Microsoft Dynamics NAV\110\Modern Development Environment”

Or in the

“C:\Program Files (x86)\Microsoft Dynamics NAV\110\Modern Development Environment”


Visual Studio code configuration to NAV 2018

This will install AL Language Version 0.12.15355


Visual Studio code configuration to NAV 2018
Once the Extension installation is complete, follow below steps

Press Alt+A, Alt+L to trigger the Go! Command

Enter Project Name and Press Enter


Visual Studio code configuration to NAV 2018

Choose “Your own server”

Once you select the “Your own server” you will see a code like below in the “launch.json” file.
Visual Studio code configuration to NAV 2018

Update the information to look similar to below:-


Visual Studio code configuration to NAV 2018

I have updated my ServerInstance as DynamicsNAV110 (you check your instance name if changed while
installing server)

I have updated my Authentication as Windows (I am using Windows authentication update what yours
use accordingly)

I have added Port as 8049 (please check and use accordingly you are using the port, if using default 7049
then this step not required)

Now save your File. And Press <CTRL + F5>.

In case of NetFx40_LegacySecurityPolicy should not be enabled error while publishing open


Microsoft.Dynamics.Nav.Server.exe.config file and change the enable= false

Path: C:\Program Files\Microsoft Dynamics 365 Business Central\130\Service


Visual Studio code configuration to NAV 2018

Enter your Credentials.

The server url and the web client url are assumed to be the same. That is not the case. The two settings
we talked about above, the server url and the developer port number, are the only settings you need in
the launch.json.
When VS Code publishes the extension to the NAV server, the NAV server returns the web client url as a
response. This url is then opened in the browser. No setting needed in the launch.json at all.
The NAV server reads that setting from the Web Client Base Url server setting.
Visual Studio code configuration to NAV 2018

Your Extension is published, you can verify as below:


Visual Studio code configuration to NAV 2018

How to Set Dependencies:


In Visual Studio Code Base objects can be accessed because the package of base objects are
loaded from the VSIX file. To Access the published customized objects we have to define the
dependencies.
Multiple Dependencies can be set for a visual studio Code project.
Open App.Json File in Visual studio code and assign the dependency for the project as shown:

You might also like