A couple of months ago Microsoft released a tool enabling to gather code metrics on code form command line. (detailed post here).
While it took me some time I’ve updated my Msbuild custom tasks project and added an Msbuild task for better integration of the tool into a build cycle.
The task enable the exporting of metrics for a given solution and includes an xsl to transform the resulting xml into an html report.
(older tasks in the project allowed running all tests (using mstest) in a given solution and exporting VS coverage report to an xml)