title: How to add custom statistics to a TFS 2010 build?
body: <p>I want to integrate the execution of a custom tool to our build (say <a href="http://cloc.sourceforge.net/" rel="nofollow">CLOC</a>, to gather LOCs by language) in TFS 2010. I know I can do that by creating a custom activity that I can then integrate into a custom template (or simply use the <a href="http://msdn.microsoft.com/en-us/library/microsoft.teamfoundation.build.workflow.activities.invokeprocess.aspx" rel="nofollow">InvokeProcess</a> activity).</p>
  
  <p>The real question is that I want to associate the results of this tool (LOCs by language) to every build, so that custom reports can be created to see the evolution of these values (e.g. the evolution of total LOCs over time/builds).</p>
  
  <p>I have seen a sample of <a href="http://consultingblogs.emc.com/stevewright/archive/2008/07/11/how-i-built-a-team-foundation-server-custom-data-warehouse-adapter.aspx" rel="nofollow">a custom datawarehouse adapter</a>: is that the way to go? Do I store my custom values in the <a href="http://msdn.microsoft.com/en-us/library/microsoft.teamfoundation.build.client.ibuilddetail.aspx" rel="nofollow"><code>IBuildDetail</code></a>? How?</p>