Visual Studio Online offers you a hosted build controller to build your projects directly in the cloud. With every Visual Studio Online account you will get 60 minutes of build time for free. If you are using Visual Studio for your productive projects you will certainly exceed the 60 minutes in a few days. This is no problem at all since you can switch the build resources to paid shared resources (see picture below). The hosted build will then cost about $0.05 per minute which is about $ 3.00 per hour.
There are some limitations which could stop you from using the hosted build controller. This blog post will cover how to setup a custom build controller and agent to be used together with Visual Studio online.
The following table shows the limitations of the Hosted Build Controller compared with an on-premise build controller and agent:
|Hosted Build Controller||On-Premise Build Controller and Agent|
|predefined Software (link)||customize the deployment according to your requirements|
|supports custom activities and build tasks||supports custom activities and build tasks|
|1 running build at a time||scale-out parallel builds with multiple build agents|
|<= 1 hour build time per build request||unlimited build time|
|<= 75 GB of storage for build||unlimited storage (depending on your hardware)|
|does not run with administrative privileges||running with administrative privileges possible|
|no log on to the build controller / agent||log-on / remote desktop possible|
|build cannot run in interactive mode||build can run in interactive mode|
Depending on your requirements, there might be a need to use a custom build controller and agent to build your software with Visual Studio Online.
To use a custom build controller for Visual Studio Online, we need to setup a build machine the same way as we would do with an on-premise installation of Team Foundation Server. Since we are using the cloud for TFS, it is a good choice to also run the custom build controller an agent in the cloud but you are not limited to it.
To start we need a virtual machine with all the development tools configured and then install and configure the Team Foundation Server Build services.
When our virtual machine is up and ready, we need to install the Team Foundation Server build services. We then connect the build controller to our Visual Studio Online Team Project Collection.
Having configured our new build controller, we now can create a new build definition using our newly created build controller. Go to the team explorer an create a new build definition. In the “Build Defaults” tab, our new build controller is listed as shown below: