If you followed the steps to create your own CONTOSO-like virtual machine (Part 1 / Part 2) you might want to set it up for the usage of version control. Here’s how you get through to it – despite the trouble you are about to run into.
Visual Studio Team Services
Formerly known as Visual Studio Online the online service equivalent to Team Foundation Server and state-of-the-art choice is Visual Studio Team Services. The bare minimum you need to do is to open visualstudio.com, register (I registered axility.visualstudio.com) and create a project (I created one called axility basics).
Create the repository folder and a subfolder first. I created C:\AxRepository\AX\.
Setup in AX and troubleshooting
To set up version control in AX you open a development workspace and navigate to Version Control / Version Control Parameters (shortcut Ctrl + Shift + V). On the General tab set the Version control system to Team Foundation Server and the value for Repository folder to C:\AxRepository (if you created it with that name earlier). On the second tab you set the following:
- Team Foundation Server URL: https://axility.visualstudio.com/DefaultCollection
- Team Foundation project name: axility basics
- Branch folder: Dev
- Application root folder: AX
Besides the Branch folder you have to use the values you defined before. The branch you define here should reflect the branch you will be working on.
Go back to the first tab and enable version control. If you followed my instructions to create the virtual machine you’ll get an infolog containing the following error message:
C:\AxRepository\AX Team foundation server error Could not load file or assembly 'Microsoft.TeamFoundation.Client, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
It looks like AX still gets compiled against an older version of Team Foundation Server (2010). To resolve this issue you need to install the Team Foundation Server 2010 SP1 Object Model Installer first. You can download it here. Install it and restart AX to see if it works. Drum roll…
Still it won’t work – but now you’ll face a different error message.
C:\AxRepository\AX Team foundation server error Team Foundation services are not available from server https://axility.visualstudio.com/defaultcollection. Technical information (for administrator): TF400813: Resource not available for anonymous access. Client authentication required.
This time the reason is that we still need an additional component, the Visual Studio 2010 SP1 Team Foundation Server Compatibility GDR which is downloadable here.
Restart AX again and notice it works now – it’ll tell you that there’s a pending add for the VCSDef.xml which is the descriptive file holding the additional settings for version control integration and behavior. You find those settings via Version Control / System setup. The cool thing with having the file under version control is that you control the behavior of other’s systems connected to that VSTS branch because everyone gets the setup from version control. So you want to check it in. You might even think of restricting access to that file.