This metrics tool does not look very useful.
If you want to measure programmer's performance using number of files and lines, you would highly demotivate them.
Anyway, you will find all you need if you use the following Microsoft assemblies bundled with .NET Framework:
Microsoft.Build.Framework
; see also
Microsoft.Build.Engine
,
Microsoft.Build.Utilities
. For custom tasks, use
Microsoft.Build.Tasks
. In a nutshell, you can add a custom task which analyzes existing projects and output the statistics you need. You can add such task in a special project of your solution or an existing project.
See MSBuild help:
http://msdn.microsoft.com/en-us/library/dd293626.aspx[
^].
—SA