Setting Up Version Control in Dynamics 365 for Operations With Visual Studio

by | Updated January 9, 2018 | Development, Dynamics 365 for Finance and Operations

The first step to creating a new Dynamics 365 for Operations (Ax7) project is to setup Visual Studio Online (VSO). Visual Studio Online now supports Git version control, but if your solution will be deployed to a customer site, Microsoft recommends that you choose Team Foundation Version Control; at least for any projects that interface with Life Cycle Services (LCS).

If you haven’t already, you need to visit to sign up for Visual Studio Online.  You will choose an account name when you sign up. This account becomes part of the URL you will use to access all your projects.

Creating a Project in Visual Studio

Now we will create a project. I will call mine Ax7Experimentation because I plan on using this project to test functionality and try new ideas.

Visual Studio Create a team project

  • Click the Create project button.

Visual Studio Create project name

Now we need to setup the folder structure expected by Dynamics Ax7. Click the Add code button. This will take you to the root folder of your code repository. There you will see a single folder named BuildProcessTemplates. Unfortunately, we cannot create the necessary folders from the web viewer, we must connect Visual Studio to our project and continue from there.

  • Start Visual Studio 2015 as an Administrator. I would recommend checking the box on the Compatibility tab of the shortcut properties.

Visual Studio Properties

Start Page Microsoft Visual Studio

  • If you haven’t done so already, sign into your Microsoft Account (the one you used to create the project).  If prompted, you will need to select Personal account.

Visual Studio Personal account

  • From the Team menu, select Manage Connections… to open the Team Explorer window.

Microsoft Visual Studio Team Explorer Window

  • Click the Connect… link in the middle of the Team Explorer window. From the resulting dialog, select your Team Foundation Server.


  • Click Connect.

Now you are prompted to configure your workspace mappings.  This will create a local folder that holds a copy of all your files. It also acts as your staging folder, holding a copy of new files until you submit them.


  • Click the Configure your workspaces link.
  • Choose a local folder to store your code.

For Dynamics 365 for Operations (Ax7) work, this folder will only contain your projects and non-Ax7 code. All your Dynamics metadata artifacts will reside in another folder. I will store my code in a new root-level folder called AxTFS.


  • Enter your folder name and click the Map & Get button.

You now have a local folder mapped to your VSTO. Click the Source Control Explorer button to open the explorer. Here we will finish the workspace mappings and create the initial required folders. We will start with folders that represent the trunk and main branch; Trunk and Main. Because this folder will hold the files related to Visual Studio projects, we will create a Projects folder. Create the folder structure by right-clicking on each parent node and choosing New Folder.


Lastly, we must tell VSTS where to store the Dynamics Ax metadata files. These files are managed by Visual Studio and are in a folder controlled by the AOS service; C:\AOSService.

  • Right-click the Main folder and choose New Folder to create a folder for our metadata. Name the folder Metadata.
  • To change the mapping for this folder, expand the Workspaces drop-down in the toolbar and choose Workspaces…, then click Edit…


  • Remap the Metadata folder to the PackagesLocalDirectory folder by adding a new line to the grid.


  • Click OK.
  • When prompted, click Yes to get the latest files.  There won’t be any new files however because we just created this repository.
  • Click Close to close the Manage Workspaces dialog.

Now we will submit the folders and add the structure to VSTS.

  • Click the Pending Changes button to see the list of pending changes.  Enter a check-in comment and click the Check In button.


The next step is to convert the Main folder into a branch.

  • To do this, right-click the Main folder, choose Branching and Merging > Convert to Branch.


  • Enter a comment and press Convert.


Notice that the folder icon has changed to a branch icon.


When you create a new Dynamics  365 for Operation (Ax7) project, you should store the project in your VSTS controlled Projects folder. The Metadata folder mapping we created will allow Visual Studio to create the project elements in the correct location and still allow you to add them to version control.




Related Posts


  1. Diego

    Hi there
    I did all the steps of this blog, then I downloaded a solution from team services (the solution was uploaded previously by me with other visual studio in other virtual mahine) and I opened it but I can not see the form, I can just build and rebuid and it does not impact in the web client. What else can I check in my visual studio?

  2. Brandon Carmichael

    Hello Diego,

    If you followed the steps outline by Mark in the blog, I am unsure how to help without seeing or being in your environment. I would suggest reaching out to your partner to see if they can help. If that is not an option, if the issue continues, or if it escalates we do offer support plans that can be used a variety of ways.


  3. HL

    Hi Mark,

    Thanks for the detailed information which really helped in setting up the VS/VSTS and relevant mappings.


  4. Taylor Valnes

    Hi HL,

    We’re really glad this helped. Thank you for the comment!


  5. parimal raj Viswanathan

    I have a download visual studio 2015. I have a azure with user name and password. I can able to access Dynamics 365 but after I open Visual studio 2015. Dynamics 365 menu is not appearing. how to make that Dynamics 365 menu to create packages using visual studio 2015 / 2017.

  6. Taylor Valnes

    Hello Parimal,

    In order to get access to the Dynamics 365 menu you’ll need to download a development virtual machine from LCS.


  7. Søren Regenberg

    Excellent post – just what I needed. Thanks a lot!

  8. Leah Baker

    Glad we could help!

Submit a Comment

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

Upcoming Events


03mar10:00 am10:30 amThe Modern Manufacturer - MRP vs. MPS – What, When and How

03mar2:00 pm2:30 pmLot Management Best Practices for Batch Manufacturers

10mar10:00 am10:30 amEnhancing the Customer Experience and Driving More Business with Dynamics 365 Customer Service

10mar2:00 pm2:30 pmThe Five Steps to Managing Sales Tax

11mar11:00 am12:00 pmConfab with Stoneridge - Livestream - Power Apps Component Framework Power Hour

17mar10:00 am10:30 amThe Modern Manufacturer: Pro Tips for your Finance Team

24mar10:00 am10:30 amUnlock the Potential of Digital Marketing with Dynamics 365 Marketing

25mar11:00 am12:00 pmConfab with Stoneridge - Livestream - The Four Keys to Choosing the Best ERP or CRM Solution

31mar10:00 am10:30 amThe Modern Manufacturer: Keys to Reporting Success

31mar01aprTraining Class: Financial Reporting W/Account Schedules for Dynamics 365 Business Central


31mar01aprTraining Class: Financial Reporting W/Account Schedules for Dynamics 365 Business Central

07apr10:00 am10:30 amBoost Seller Productivity and Close More Business with Dynamics 365 Sales

07apr2:00 pm2:30 pmEnsuring Quality for Batch Manufacturers

08apr11:00 am12:00 pmJumping into the Deep End of the Data Lake

14apr10:00 am10:30 amThe Modern Manufacturer: Cost Accounting in D365

22apr11:00 am12:00 pmMoving from Manual to Automated with Strategic Automation Strategies

28apr10:00 am10:30 amThe Modern Manufacturer: Best Practices for Inventory Turn

About Stoneridge
Stoneridge Software is a unique Microsoft Gold Partner, with emphasis on partner. With specialties in Microsoft Dynamics 365, Microsoft Dynamics AX, Microsoft Dynamics NAV, Microsoft Dynamics GP and Microsoft Dynamics CRM, we focus on attracting the most knowledgeable experts in the field to our team, and prioritize delivering stellar solutions with maximum impact for your business. At Stoneridge, we are deeply committed to your results. Each engagement is met with a dedicated team, ready to provide thorough, tailored, and expert service. Based in Minnesota, we intentionally “step into your shoes,” wherever you are. We focus on what you care about, and develop trusting, long-term relationships with our clients.

Subscribe To Our Blog

Sign up to get periodic updates on the latest posts.

Thank you for subscribing!