Wednesday, May 29, 2019

#MSDYN365BC: Building a Development Environment for Microsoft Dynamics GP ISVs - Selecting a Source Control Provider

So far, I have covered the process of setting up both the Microsoft Dynamics 365 BC containerized application components, along with the VS Code IDE and AL language extensions. We also built the "Hello World" extension on BC's Customer List page and deployed it to our container by following some simple debugging steps. You can read more about it in the following articles:

#MSDYN365BC: Building a Development Environment for Microsoft Dynamics GP ISVs Part 1/3
#MSDYN365BC: Building a Development Environment for Microsoft Dynamics GP ISVs Part 2/3
#MSDYN365BC: Building a Development Environment for Microsoft Dynamics GP ISVs Part 3/3 #MSDYN365BC: Building a Development Environment for Microsoft Dynamics GP ISVs - Installing Visual Studio Code

The purpose of today's article is to show you how to set up a source code control provider to host your projects for a multi-developer's environment. If you are a Microsoft Dexterity developer, you are probably familiar with using source code control repositories like Visual Source Safe, Team Foundation Server, or even Azure DevOps Repos. I wrote an entire series of articles on the subject, which you can review here:

#DevOps Series: Microsoft Dexterity Source Code Control with Visual Studio Team Services

Downloading and Installing Git

To begin, we will need Git. Git is a plug in for VS Code that allows you to manage code in both Azure DevOps and GitHub, depending on your source code control repository preferences. You can begin the download process by going directly to

1. Launch the Git installer and accept the license agreement.

2. In the Select Components window, choose to add Git to your desktop. It just makes life a lot easier. Note, you can also integrate Git to File Explorer, in order to be able to open configuration files and Bash files directly.

3. In Choosing the default editor used by Git make sure to select VS Code as this is primarily the tool used for AL development anyways. This way, you will have one place to develop your code and address any source code repository administrative tasks.

4. For the PATH environment variable, you will want to make sure you can run Git from the Windows command line (DOS prompt) and any third party software - including VS Code.

5. Accept the default here and move on. Of course, if you have a domain environment and want to issue and validate certificates against your Windows Certificate Store, then make sure to choose the Windows Secure Channel library option.

6. I honestly don't have a preference here, but if I had to guess, the Checkout Windows-style, commit Unix-style line endings option is probably more suitable for code being checked into your repository.

7. For the terminal emulator setting, we will use Windows' default console window.

8. Here, I only accepted the defaults.

Connecting to Azure Repos

There are tons of resources on the net explaining how to point VS Code to an Azure DevOps or GitHub repository, depending on your organization's preference. This particular article will explain how to integrate with Azure Repos.

1. Open VS Code and click on the Extensions button. Type "Azure Repos" to locate and install that particular extension .

Azure Repos extension
2. For the final part of this article, you can see the complete process in the following video I prepared showing how to create a Azure DevOps project, synchronize the repository with VS Code, and add your first project files to the repository.

Until next post!

Mariano Gomez, MVP

No comments: