Local TF Build + VSO + Dynamics AX

In a recent post, I explained that you may want to use a local Team Foundation Build server with Visual Studio Online. Here I wanted to show how to install and configure it, but then I realized that it’s already covered on a few other places. Therefore I won’t repeat the same thing again and simply give you a link: Configuring on-premises Build server for Visual Studio Online by Anthony Borton.

Now we can use the spared time to talk about what happens after setting up your build server.

First of all, you have to tell the build server what to do. This is done by build templates, which define what actions should be performed and in which order; you can also add conditions, input parameters and so on. You can look at Customize your build process template to understand how to create and use a custom build template.

The problem is that Team Foundation Server knows nothing of Dynamics AX, therefore you have to tell it how to create models, compile CIL and anything else AX-specific you want to do during your build. Fortunately you don’t have to develop all these things by yourself – you can download TF Build activities for Dynamics AX from CodePlex: Dynamics AX Admin Utilities. To learn how to use it, read Easy Automated Builds series on Dynamics AX Musings blog.

The CodePlex project also contains a build template you can use as a starting point for your own process definition. Nevertheless don’t expect that you’ll find a template that will exactly match your process. Modeling what your situation requires is your own responsibility.

It’s important to realize that your local build server doesn’t merely download source code – it’s fully integrated with VSO, therefore you can:

  • Start builds from any client application connected to VSO, including the web portal
  • Review status of running and finished builds
  • Download build output (such as AX model files) from the portal
  • Get build notifications
  • And so on

Nevertheless it doesn’t mean that all clients have exactly the same capabilities. For example, you won’t see all build parameters in the web UI, therefore you may want to use Visual Studio instead in some cases.

If you’ve never seen build results in VSO, here is an example.BuildResultsOnVSONotice links for queuing new builds, downloading logs, artifacts (= output), link to the exact version of source code, issues (compilation errors, warnings, TODOs), associated work items and so on. It gives you a huge amount of options.

This is nothing new for people using Team Foundation Build with on-premise TFS. The point is that you can use exactly the same even with Visual Studio Online.