Code Metrics Viewer 2010

Free

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.

(33) Review
Visual Studio
2010
Download (41,377)
6/4/2014
1.6.4
View
E-mail Twitter del.icio.us Digg Facebook
Add to favorites
Description
Reviews (33)
Q and A (30)
Sign in to write a review
Sort by:

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 |
Delete

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 |
Delete

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: http://codemetricsviewer.wordpress.com/2011/06/26/how-to-get-it-working/

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 | 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

by Ehsan Mohammadi | October 08 2011

by Shawn Axsom | September 23 2011

One suggestion:

The "Goto Next" button is great, but it would be even better if we could make it look at only Classes OR Methods, not both at the same time. For example, I wanted to look for Methods that were over 20 lines long, but it kept jumping to almost every class in the solution...


Otherwise, great add-on!

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


  • 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: http://bit.ly/14yCMmF
    • I am having MS VS 2010 Prof and had installed Tool from this location http://www.microsoft.com/en-us/download/details.aspx?id=9422 and thereafter installed viewer from http://visualstudiogallery.msdn.microsoft.com/9f35524b-a784-4dbc-bd7b-6babd7a5a3b3/view/Discussions/0. 
      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,
      Juan
      
    • 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: http://bit.ly/16rL0Nw
  • 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: http://bit.ly/YMIb9o
  • Download problems
    2 Posts | Last post January 23, 2013
    • When I attempt to download this I get the following error 
      
      Gateway Anti-Virus Alert
      
       
      This request is blocked by the SonicWALL Gateway Anti-Virus Service. Name: Dropper.GEN_1146 (Trojan) 
      
    • This has also been reported by another user in September last year. He used the same anti-virus software. There is no trojan/virus in the package; do not use the extension, if you´re in doubt (-:
  • TFS Build support
    2 Posts | Last post January 04, 2013
    • Is TFS Build supported? Thanks.
    • Not sure what you mean... if you want to calculate metrics during build, you can utilize the commandline utility; you don´t need the extension to achieve this.
  • No process is associated with this object.
    8 Posts | Last post November 09, 2012
    • I've got a solution with a single executable and the rest are dll libraries that get loaded dynamically.  The code metrics are "calculated" for each file right until near the end when it says "No process is associated with this object" and goes no further.
      
      Can anyone shed any light?
    • I have the same problem.
      Is there any log for this tool so I can get a deeper understanding of what is the problem?
      Has anyone else experienced this before?
    • Hi
      
      I´ve never experienced this behavior during development or in a testing environment. The extension utilizes the Metrics.exe application (the Code Metrics Power Tool) by creating a process and waiting for the exit. The wait-for-exit operation might fail, if the process could not be created. Maybe you´re using an anti-virus or anti-spyware software that denies the process creation... just an idea.
      
      Kind regards,
      Matthias
    • I'm getting this same problem on a random project in my solution.  (I've seen it fail on 12/65, 19/65, 16/65...).  Is there any type of debugging I can look at?
    • I see the same issue when trying to Analyze my solution.
      My solution has 10 assemblies, and the analysis seems to go through 3 of them. I can see that Metrics.exe does start, but seems to die prematurely. I've tried 'unloading' projects to see whether I can get further, but I still get the same error message.
    • Has anybody tried to run the metrics.exe application from the commandline; just to see, if there are any errors or circumstances preventing the application from execution?
    • No, but I'd like to try. What command line swicthes does CMV (Code Metrics Viewer) make use of? Where is the (intermediate) 'out' file created?
      
      TIA.
    • By default, the Tools>Options>Code Metrics>Reports>Output path setting is "MetricResults". Should this be changed to something else? Also clicking on the ellipsis doesn't seem to allow me to browse. I'm just wondering whether the problem is because the /out param is invalid.
  • can't execute the matrics.exe
    1 Posts | Last post November 04, 2012
    • Hello, I have download the tool and placed it  in C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop. Why I always get the error massage "metrics.exe is not recognized as an internal or extrnal command, operable program or batch file" ? What have I done wrong?
      except of that, the tool inside visual studio is work fine.
      
      someone can please help?
1 - 10 of 30 Items