06 December 2017

Configure Visual Studio Code with Dynamics NAV 2018 (Local Server Installation)

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

I already had Visual Studio Code installed on my computer (Click to download Visual Studio Code) so I open up the application.

Do not follow Section 01 steps because you will run into issues. Read the Section 02 of the instructions to get it work.

Section 01 :

First thing I want to do is download AL Extention. In order to download AL extension follow below steps:

  1. Go to View Menu and click on Extensions. 
  2. Search for AL 
  3. Click Install


Once the Extention installation is complete I followed below steps:

  1. Press Alt+A, Alt+L to trigger the Go! command, 
  2. Choose "Your own server"
  3. Once you select the "Your own server" you will see a code like below in the "launch.json" file. 


I change the settings as below :


  "version": "0.2.0",  
   "configurations": [  
     {  
                "type": "al",  
                "request": "launch",  
                "name": "Local server",  
                "server": "http://localhost:7049",  
                "serverInstance": "DynamicsNAV110",  
                "tenant": "default",  
                "authentication": "Windows",  
                "startupObjectId": 22  
     }  
   ]  


Once I do that I got an error message, and I could not resolve it. (Could not download symbols. Please see the Visual Studio output log for more details)



Then I thought it is something to do with the Service tier config so I open up the config file and notice that "Enable loading application symbol reference at service startup" is disabled. I enabled it and restart the instance.



Even after that also I could not get to download symbols. Therefore I thought to use a different approach.

Section 02: 

I thought to install AL extension manually by using VSIX file.

  1. Uninstall AL extention from Visual Studio Code.
  2. Click View -> Extention.
  3. Click on ... to open the extension menu.
  4. Click on Install from VSIX



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"


This will install AL Language Version 0.12.15355

Once the Extention installation is complete I follow below steps

  1. Press Alt+A, Alt+L to trigger the Go! command.
  2. Choose "Your own server"
  3. Once you select the "Your own server" you will see a code like below in the "launch.json" file. 


   "version": "0.2.0",  
   "configurations": [  
     {  
       "type": "al",  
       "request": "launch",  
       "name": "Your own server",  
       "server": "http://localhost",  
       "serverInstance": "nav",  
       "authentication": "UserPassword",  
       "startupObjectId": 22  
     }  
   ]  

In my local installation, I use Windows Authentication and my NAV instance is different. Therefore I change the file values as below.

    "version": "0.2.0",  
   "configurations": [  
     {  
       "type": "al",  
       "request": "launch",  
       "name": "Your own server",  
       "server": "http://localhost",  
       "serverInstance": "DynamicsNAV110",  
       "authentication": "Windows",  
       "startupObjectId": 22  
     }  
   ]  

Once I update the values and save the file, it successfully downloads the symbols.

Please let me know if you use a different approach or if it workes with online extension installation for you.

Please provide your feedback with a comment.
Thank you and Regards,
Tharanga Chandrasekara
Read more »

Install Dynamics NAV 2018 with Modern Development Environment

Microsoft released Microsoft Dynamics NAV 2018 a few days ago and by now most of you have already downloaded the setup. If you don't have it already, you can download it by clicking here.

In this blog post, I will not go through each step as it is not much different with the installation process compared to previous versions. I want to highlight few new things which most people will not notice during the installation process.


In most of the time, I use the Customize installation option as it allows me to select individual components I want to install. In this instance, also I select the Customize option.

If you want to work with new development tool (to develop extensions) you want to enable "Modern Development Environment". By default, it is enabled and you do not have to do anything. If you not planning to work with new development tool then you can remove it from installation.



In the very next step, you will find another 2 new fields (it is growing by each version)
which are related to new Developer tool. 
  • Field 1: "Developer Service Port"
  • Field 2: "Developer Service Enabled"
You can ignore these two fields but if you planning to work with Modern Development Environment then I suggest you set it up correctly on the first go.

Developer Service is disabled by default, so you need to enable it (YES)



Once you pass the above step, everything is similar to previous version installation.

If you have already installed Microsoft Dynamics NAV 2018 without enabling the "Developer Service" then you can go to Dynamics NAV instance and change the settings (Restart instance after the changes)



Or

If you like to use PowerShell to change the port numbers (Try to make it a habit to use PowerShell as much as possible) you can use cmdlet

 Set-NAVServerConfiguration <InstanceName> -KeyName 'DeveloperServicesPort' -KeyValue <PortNumber>  
 Set-NAVServerInstance <InstanceName>-Restart -Verbose  

Good luck!!

Please provide your feedback with a comment.
Thank you and Regards,
Tharanga Chandrasekara
Read more »

02 December 2017

Welcome to Microsoft Dynamics NAV 2018

The long wait is finally over. Microsoft Dynamics NAV 2018 is now available for download. 



You can now download Dynamics NAV 2018 by clicking here

Please provide your feedback with a comment. 
Thank you and Regards,
Tharanga Chandrasekara
Read more »