At work we use Subversion for source code version control and the excellent CruiseControl.NET (ccnet) for continuous integration.

One of the things we do is version all of the assemblyinfo files with the subversion revision number. This way all the files we release have a build number that can be traced directly back to the subversion revision number so we can see what changes were made if there are any problems.

Unfortunately when looking through the ccnet webdashboard you don't get shown the SVN revision in the summary. This is because ccnet is designed to work with a multitude of source repositories and not just Subversion. Fortunately adding the revision to the summary page is a really simple task. Here's what it looks like:

buildlog

In order to get this showing you need to edit the .xsl file used to display the summary page.

1. Open {$CC Installation Root}\webdashboard\xsl\header.xsl
2. Go to the bottom of the file and locate the "Last Log Entry" section. It should look like this.

<tr>
<td class="header-label" valign="top"><nobr>Last log entry:</nobr></td>
<td class="header-data"><pre><xsl:value-of select="comment"/></pre></td>
</tr>


3. Copy & Paste this section directly underneath it and edit is as shown here

<tr>
<td class="header-label" valign="top"><nobr>Last log entry:</nobr></td>
<td class="header-data"><pre><xsl:value-of select="comment"></pre></td>
</tr>
<tr>
<td class="header-label" valign="top"><nobr>SVN Revision:</nobr></td>
<td class="header-data"><pre><xsl:value-of select="changeNumber"/></pre></td>
</tr>


4. Save the changes to header.xsl
5. Open your browser and navigate to a build summary. The SVN Revision should now be shown.
6. You're done. Go get yourself a coffee.