In the previous episode I intended to cover the configuration of TeamCity, but took a quick detour to talk about MSBuild and MSBuild scripts. Now that we've got a script to use we can configure TeamCity. The following will be the minimal steps to get up an running.
At this point all of the necessary steps have been completed. However, TeamCity offers more options that can be configured around your project. The options are listed on the right side of the screen under Build Configuration Steps heading when you're editing a project. All of these options are also available from the Edit Configuration Settings link on the project tool bar. One of the options in particular is worth considering - Build Triggering. TeamCity offers many options for triggering a build. The one I found most useful is VCS Triggers. TeamCity can check for any changes to your source control repository on the interval you choose and run a new build with the changes.
In order to make use of your project you need to have an authorized build agent available. Click on the Agents tab in the top left area of the screen. Under the Agents heading you will see four tabs. One of them (probably the Unauthorized agents tab) should have a number greater than zero in parenthesis. Click on that tab. If it is the Unauthorized agents tab click on the Authorize agent link then move over to the Connected Agents tab and click the Enable agent link if necessary. Your agent is now available for use.
With your project completed you will find it listed under the Projects tab (top left area of screen). Choose your project from the drop down menu embedded in the Project tab. Under the Current status section of the Overview tab if you have a No suitable agents link return to the previous paragraph and check your settings. From this screen you can trigger a build by clicking on the Run button in the toolbar. After a second or two the page will refresh and show you the status of the build as it progresses. The build result will be shown in the Recent history section of the page.
A word about troubleshooting a failed build: If the build fails you can use the drop down menu in the history list beside the result in the Results column to view the build messages to guide your troubleshooting. A couple of things that have tripped me up are forgetting to add a newly referenced dll to source control. Along the same lines, referencing a new dll and not updating the MSBuild script accordingly caused a failed build. If you have no idea where to begin troubleshooting start by running the script locally from a Visual Studio command prompt. See the end of Episode 4 for more information.
If you're new to TeamCity I would suggest spending the time to explore the interface and become familiar with the many available options. As I said at the start of this post, I've only covered the minimal step to get you up and running from a cold start.
All code examples are presented "as is", and the user assumes all responsibility for use. The opinions expressed in this site are mine and do not reflect those of my employer.