Share This Post

D365 Container Sandbox Development Environment

Dynamics 365 Business Central provides a container based image environment that enables access to both the AL development environment and the C/SIDE D365 Container Sandbox Development Environment.

You setup a container sandbox by running the SANDBOX ENVIRONMENT (CONTAINER) page from MS D365 Business Central. You will have to decide whether you want an Azure-hosted or locally hosted container sandbox.

D365 Container Sandbox Development Environment Overview

1. Choosing an Azure Hosted or a Local Hosted Container Sandbox

When you setup the container sandbox, you can select to host the sandbox on Microsoft Azure or on a local computer. Both environments provide the same capabilities and utilize Docker to provide the infrastructure for the container-based application. The differentiation is:

  • With Azure hosting, Docker is installed and configured for you. Although, Azure hosting requires that you sign up for an Azure subscription, and additional costs may be incurred for each container sandbox.
  • Local hosting requires that your computer is running Windows 10 or Windows Server 2016 and you install and configure Docker prior to setting up the D365 Container Sandbox Development Environment.

2. Set up an Azure-hosted Container Sandbox

  • If you you do not already have one, sign up for an Azure subscription.
  • In Dynamics 365 Business Central, enter SANDBOX ENVIRONMENT (CONTAINER) and then select the relevant link.
  • Choose Host in Azure. If prompted, enter the user name and password of your Azure subscription. The Azure portal opens to display a custom deployment form.
  • Fill out the required fields on the form and then select Purchase.

3. Set up a Local-hosted Container Sandbox

  • If not already done, install Docker.

To install and configure Docker, choose the version of Docker that is appropriate for the host operating system:

    • For Windows 10, download from Docker Community Edition for Windows.
    • For Windows Server 2016, download from Docker Enterprise Edition.
  • In Dynamics 365 Business Central, enter SANDBOX ENVIRONMENT (CONTAINER) and then select the relevant link.
  • Choose Host Locally.
  • Save the CreateBCSandbox.ps1 file to your computer.
  • Run Windows PowerShell ISE as an administrator.
  • Open the CreateBCSandbox.ps1 file.
  • Set the $containername = '' variable to the name that you want to give the container, for example $containername = 'MyBizCentralApp'.

This name is only used internally in your environment for identification purposes.

  • Set the $accept_eula = '' variable to '$true'.
  • Press F5 to run the script.

The console pane displays the progress of the script. When the script has finished successfully, data like the following will be shown:


Container IP Address: 172.22.147.63
Container Hostname : MyBizCentralApp
Container Dns Name : MyBizCentralApp
Web Client : http://MyBizCentralApp/NAV/
Dev. Server : http://MyBizCentralApp
Dev. ServerInstance : NAV

Files:
http://MyBizCentralApp:8080/al-0.15.18566.vsix

Initialization took 116 seconds
Ready for connections!
Reading Custom Settings.config from MyBizCentralApp
Creating Desktop Shortcuts for MyBizCentralApp

  • Write down or copy the following parameter/values from the console: Dev. ServerDev. ServerInstance, and Files.

You now have a D365 Container Sandbox Development Environment set up on your computer. The following shortcuts have been added to your desktop:

  • <Container name> Windows Client – opens the Windows client for your application in the container.
  • <Container name> Web Client – opens the Web client for the application in the container.
  • <Container name> CSIDE – opens the Microsoft Dynamics NAV Development Environment for developing your application using CSIDE.
  • <Container name> PowerShell Prompt – opens a Windows PowerShell prompt in the container. This gives you access to the Dynamics NAV, which you can run against the container sandbox environment.
  • <Container name>Command Prompt – opens a Windows command prompt in the container.

4. Set up Visual Studio Code

After the D365 Container Sandbox Development Environment is set up, you must set up Visual Studio Code for extension development. To do this, you need the values for Dev. ServerDev. ServerInstance, and Files parameters that you retrieved from the Windows PowerShell ISE console when you ran the CreateBCSandbox.ps1 script.

  • Open a browser to the path that is specified by the Files parameter and store the .vsix file to your computer.
  • Inside Visual Studio Code, go to Extensions and then select Install from VSIX. You now have the AL Language extension enabled.
  • In Visual Studio Code, press Ctrl+Shift+P and then choose AL Go!.
  • Choose where to create the project, and then choose the Your own server option.
  • Open the generated launch.json file, update the "server" setting with the value of the Dev. Serverparameter and the "serverInstance" setting with the value of the Dev. ServerInstance to show the container you just created. For example:

“server”: “http://MyBizCentralApp”,
“serverInstance”: “NAV”,
“authentication”: “Windows”,

  • Save the launch.json file.

You have now set up Visual Studio Code with the AL Language extension. For more details on D365 Container Sandbox Development Environment, please contact us.

Share This Post

Leave a Reply

avatar
  Subscribe  
Notify of
Skip to toolbar