Code Metrics Viewer 2010


Code Metrics Viewer integrates the Code Metrics Power Tool 10.0 into Visual Studio 2010 Professional and displays code metrics calculation results in a tool window.

(35) Review
Visual Studio
Download (47,592)
E-mail Twitter Digg Facebook
Add to favorites
Reviews (35)
Q and A (34)
Sign in to write a review
Sort by:

by toto2208 | October 10 2016

Code Metrics could not be located in the following path:
C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop

I followed the procedure as described here:

...and danced all the sacred dances

Matthias Friedrich October 10 2016
| Edit |

Did you download and install the required third-party tool? You probably just missed some point...

by GeekGreekGirl | September 11 2015

Excellent tool. Good professional job. Well done and thank you.

by Mahmood Ghaleb Al-Bashayreh | December 31 2013

Thank you very much for the excellent and professional work.

by Gerhard Malan | August 27 2013

Great extension, thanks! Exactly what I was looking for plus loads more. It installed straight from the Visual Studio Gallery and worked as soon as I set the path to the Tools 10.0 (as explained in your instructions). Those who have had problems with this probably didn't bother to read the instructions for their VCR either!

I particularly like the save as Excel feature that allows one to do some more analysis.

Thanks again!

by Sergio Parra | April 27 2013

Great add-on!

by RobTT | April 26 2013

I found this tool to be very useful giving a clear view of the results by DLL and allowing you to drill into the data (or search with the filter option) to find problem classes or methods; altogether easier to use than the command line tool.

by Nigel McFarlane | February 28 2013

Code Metrics could not be located in the following path:
C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop
I tried placing quotes around the path, but this caused "Analyse" to crash Visual Studio. I am running VS 2010 SP1 (with Visual Assist X) on Win7.

Matthias Friedrich February 28 2013
| Edit |

Please make sure that you´ve installed the Code Metrics Power Tool 10 (as described). Please refer to the project blog, to get further information... I would be glad, if you could think about your rating again (ask yourself if it´s fair).

by Simon Mikuda | December 01 2012

This plugin has obvious bug, when you press Analyze solution and you will get "No process is associated with this object." and it seems that author doesnt care about it at all...

by Brian Chaia | October 30 2012

by Cristi Lupascu | October 26 2012

by Ash Manos | September 07 2012

Despite setting the path multiple times, I get "The path to the Code Metrics Power Tool 10.0 is not set or the specified path is invalid". Please assist.

Matthias Friedrich September 07 2012
| Edit |

The extension should detect the correct path automatically if you press the locate button; presupposed you installed the tool correctly. If not please have a look at:

by CarlosPC1 | August 04 2012

by aburton379 | July 31 2012

Thank you so much! I had just been using what was included on VS2010 (right click project "Calculate code metrics") and it wasn't working all the time (got error "Could not resolve member reference" and it's a huge team solution so changing references and things is not easy). I installed this Viewer, and everything seems to work great!

by Linard Moll [MIT-GROUP] | June 12 2012

Great add-on!

by Adam Gabryś | April 02 2012

Great extension. It has some shortcomings (lack of horizontal scroll or red dots in Lines Of Code metric for the methods defined in interfaces), but I think they will be corrected in the future.

by Issamo-san | March 08 2012

Excellent tool, if you have a problem with the VS2010 metric calculation, go for this one ;).

by Gonzalo Brusella | January 23 2012

by craigjh | January 20 2012

I've got a short amount of time to examine code developed by an outsource company and this gives me terrific high-level information about the project. The viewer allows you to drill into the details also. It has made me a lot more productive and the information with some explanation can be shared with less technical people, which is also a huge plus.

by Michael Duesterhus | November 04 2011

by Steef-Jan Wiggers | November 03 2011

1 - 20 of 35 Items   
Sign in to start a discussion

  • Unable to locate the metrics calculator module.
    6 Posts | Last post February 15, 2016
    • I have it pointing to the correct folder (I believe), without the quotes, and I get the "Unable to locate the metrics calculator module."
      "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop"
      I also can't find the Read me file? 
      I am running Visual Studio 2010, on Windows 2008 R2 Standard.
    • Make sure the Code Metrics Power Tool is properly installed. It´s a separate download; the download URL can be found in the description...
    • I have just realized this (school boy error) by following this but there is no download link for me to get the "Visual Studio Code Metrics PowerTool 10.0" from ...
    • The link is there...  please, open your eyes (-;
    • They are wide open...
    • Could see it on my phone, so downloaded it there and uploaded up to my google to re-download. Should be all set. Looks like the download button is a known issue for some systems :s 
  • Uninstall Code Metrics Power Tool
    1 Posts | Last post January 26, 2016
    • Hi. I installed the Code Metrics Power Tool 10.0 onto VS2012 by mistake which crashes my VS. Could you please tell me how do I uninstall it as I can't find any obvious way to uninstall it? Thanks
  • Error: CA0058 - Office Use
    2 Posts | Last post July 16, 2015
    • Hi. I'm trying to use Code Metrics Viewer to get some Metrics but getting an error: CA0058 " The referenced assembly 'office, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c' could not be found. This assembly required for analysis and was referenced by" C:\xxxxxxxxxxxxxxx\Interop.Excel.dll. What do I need to do to get passed this error? Thanks!
    • This problem is related to the Power Tool itself; you can either copy the dependencies to the assembly´s directory, or configure the path in the project file. Please have a look at:
  • Visual studio crash
    2 Posts | Last post January 12, 2015
    • Hi,
      I am facing difficulty to use this tool as, when i run this tool Visual studio simply crash with out giving any error or waning.
    • Please make sure that you have installed the latest service packs as well as the Code Metrics Power Tool 10.0.
  • Failing w/VSShell Package
    3 Posts | Last post December 13, 2013
    • I have multiple projects which this tool is working great, but I have one that is a VSShell project, and it just fails to run.  I haven't found a log or anything, but I suspect it's failing because one of the shell dll's is auto-generated in C++.  If there's a way for me to turn on logging I can provide the results.
    • The tool does not have a logging mechanism. The extension runs the power tool for each project in the solution; if an error occurs it will be shown in the grid (btw, the extension is for managed code only, so C++ projects don´t work). If want to share detailed information regards your problem you can drop me a line via email...
    • Sent email a week ago or so, if you didn't get it let me know and I'll re-send.
  • Can't get it to work.
    4 Posts | Last post November 27, 2013
    • I have both tool and viewer installed, but when I press the Analyze Solution button, nothing happens. Any ideas?
    • Hi donnie, please check the information I provided on the project blog:
    • I am having MS VS 2010 Prof and had installed Tool from this location and thereafter installed viewer from 
      Have set Code Mteric Power Tool Path to C:\Program Files\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop
      and Do not generate code metrics for generated code (/igc) is unchecked.
      Still when I click on Analyze Solution on the Code Metric Viewer, nothing happens. I tried it with a simple C++ program, my solution had just two CPP and a header file. I am not getting any error, but nothing is showing up on the metric window. I wanted to use this viewer to find LOC for various solutions. Somehow it is not working and even after going through your blog, I am unable to make out what is amiss. Any thoughts? Thanks..
    • The power tool is for .NET code only...
  • Don't know why "Could not load file"
    3 Posts | Last post July 18, 2013
    • Hi Matthias,
        I've just installed your tool in my VS2012 system, thanks for all of your work. At the moment, however,I can't seem to get it to work.
        I have a solution with a Winforms main EXE A, and two class library DLLs B and C (plus a DLL with unit tests). A depends on B and C; B depends on C; C has no dependencies. When I click Analyze Solution, I get CA0055 and CA0052 for C (which prevents A and B from being loaded, but the root cause is failure to load C). CA0055 says, Could not load file : C:\Windows\Systems32\C.dll, which is clearly the wrong path. My question is, why's it looking in C:\Windows\Systems32?
        The behavior is the same using Debug and Release configurations. I am targeting the x64 platform. I read your advice concerning these errors when using custom configurations, opened the C.csproj file, which shows an OutputPath of bin\x64\Debug for the Debug config, and bin\x64\Release for the Release config. I have confirmed this is where the results of new builds get placed, and that new assemblies do get generated when I ask for a build.
        If I use Calculate Code Metrics, all the assemblies are found and analyzed.
        Any thoughts?
      Thanks again for your work,
      Phil C
    • You´ve installed it into VS 2012, really? That´s weird, because this extension targets VS 2010. The Power Tool 10.0 is not compatible to VS 2012 or above (of course I know there is a new version of the tool supporting VS 2012, but it´s not supported by my extension yet). You can send me a private message, if you like... and we can dig into the problem together.
    • Matthias,
        I'm sorry, I mis-spoke/typed: it's installed in VS2010, not VS2012. (So much for providing an accurate description of the problem.) But I think the erst of the details I provided are accurate.
        I would be grateful for any digging you could help me do. I will send a private email to the googlemail contact for you that accompanied your "How to get rid of the errors CA0055 and CA0052" article; is that the correct email address?
      Phil C
  • Multiple folders for dependencies
    2 Posts | Last post July 06, 2013
    • HHi. I started today using the power tool but have a problem: my assemblies references other assemblies that are stored in multiple folders. As far as I have seen it's only possible to specify one directory to search for dependencies.... It's possible to specify multiple folders? How can I solve this problem?
      Kind Regards,
    • I have both tool and viewer installed, but when I press the Analyze Solution button, nothing happens. Any ideas?
  • command line options?
    2 Posts | Last post April 01, 2013
    • Hello
      Is it possible to run the viewer through the command line and output the report to csv?
      I would like to keep a historical record of there stats in sql to be able to generate reports.
    • No, this is not possible. But you can run the power tool directly. You can use an XSLT transformation to convert the XML report to CSV format. This example might give you an idea:
  • VS2012 version?
    3 Posts | Last post February 06, 2013
    • Is there a plan to provide a version compatible with VS2012?  If so, any ideas when this will be available?
      Thank you for your time.
    • Yes; I had the plan to provide the extension for VS2012 as well. The problem is, that the current version of the Power Tool is not compatible to VS2012; that´s the reason why I did not provide a new extension. 
      Due to the fact, that the code metrics feature is now integrated even into the Professional edition, I guess that Microsoft won´t ship a new commandline utility (consider it was not intended to be used within the IDE, but in a build process).
      Of course, I have some ideas for workarounds, just as ideas of how to create a replacement, but this might cost to much time...
    • There is a new version of the extension supporting Visual Studio 2012; see:
1 - 10 of 34 Items