locked
Automatic code metric reports VS2012 RRS feed

  • Question

  • Hi all,

    I'm wondering if it is possible to export code metric reports to a database automatically when they are generated.

    We are attempting to create a timeline of code metrics for each class in a project in order to compare and contrast the latest code metrics with the older versions. I've searched high and low and found no solution for this in VS2012.

    Has anyone ever tried anything like this?

    Thanks, Shane


    Tuesday, February 12, 2013 4:23 PM

Answers

  • I should mention that we are using TFS2012 for source control, as far as I can see, the code metric power tool is not supported by VS2012 or TFS2012.

    After realising that there is no way of achieving automated code metric reporting in VS2012, we have reverted back to using Team City for building, as it allows for easy integration of other programs upon build-time.

    A code metric generator combined with a command line tool sounds like the way to go. The only problem is finding a code metric generator that works with TFVC. We were thinking of using StatSVN but it only works with Subversion and requires a checkout of the code to a working directory each time metrics are to be generated, which may take anywhere between 2 minutes and 30 hours given our code base.

    • Marked as answer by Ego Jiang Thursday, March 7, 2013 8:40 AM
    Tuesday, February 19, 2013 3:10 PM

All replies

  • I dont' think this will be possible directly from VisualStudio.

    What about using

      http://www.microsoft.com/en-us/download/details.aspx?id=9422

    or, if your are using TFS for Build

     http://tfsbuildextensions.codeplex.com/wikipage?title=How%20to%20integrate%20the%20codemetric%20build%20activity&referringTitle=Documentation

    and importing the results into a database?


    If you write a small command line tool for the import of the xml results created by the Metrics PowerTool you could imagine to run both tools as post-build event.
    • Edited by R.Kuhn Wednesday, February 13, 2013 10:23 AM
    Wednesday, February 13, 2013 6:25 AM
  • I should mention that we are using TFS2012 for source control, as far as I can see, the code metric power tool is not supported by VS2012 or TFS2012.

    After realising that there is no way of achieving automated code metric reporting in VS2012, we have reverted back to using Team City for building, as it allows for easy integration of other programs upon build-time.

    A code metric generator combined with a command line tool sounds like the way to go. The only problem is finding a code metric generator that works with TFVC. We were thinking of using StatSVN but it only works with Subversion and requires a checkout of the code to a working directory each time metrics are to be generated, which may take anywhere between 2 minutes and 30 hours given our code base.

    • Marked as answer by Ego Jiang Thursday, March 7, 2013 8:40 AM
    Tuesday, February 19, 2013 3:10 PM