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 https://www.visualstudio.com 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.
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.
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.
The next step is to convert the Main folder into a branch.
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.
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.
- Click the Create project button.

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


- 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.

- From the Team menu, select Manage Connections… to open the 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.

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

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

- 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.
- Click the Pending Changes button to see the list of pending changes. Enter a check-in comment and click the Check In button.

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

- Enter a comment and press Convert.



