Can people suggest the best tool to determine the cyclic complexity with in a C# winforms code base.
Asked
Active
Viewed 2.0k times
5 Answers
33
In Visual Studio I just go to Analyze/Calculate Code Metrics and I get cyclomatic complexity.
3rd party edit
- Visual Studio 2015 community edition has it as well

surfmuggle
- 5,527
- 7
- 48
- 77

Steven
- 3,878
- 3
- 21
- 21
-
I don't believe it is in VS 2005 although I am not certain. – Steven May 20 '09 at 04:17
-
It's not in VS 2005 or 2008 Pro -- are you perhaps using Team System or a similar top-end version? – Steve Gilham Aug 13 '09 at 15:58
-
4It is in VS 2010 Ultimate,just in case someone ran into this old question like me :) – shennyL Dec 04 '11 at 23:01
-
It's in VS 2012 Professional, to update the comments. – kristianp Apr 10 '13 at 06:34
-
But the Complexity Visual studio 2012 gives is IL complexity and not actual code complexity – Shaiju Janardhanan Jan 14 '15 at 10:39
-
Just checked VS 2015 Enterprise and it is there. – Hypnovirus Jul 22 '15 at 19:53
-
It's in VS 2017 Community, but it doesn't calculate for .NET Core / .NET Standard projects, nor Web projects. And it seems [MS won't change it](https://developercommunity.visualstudio.com/content/problem/28145/calculate-code-metrics-doesnt-work-for-net-standar.html) (at least not soon). – Alexandre Sep 05 '17 at 18:31
10
NDepend has a huge number of code analysis and query tools including Cyclomatic Complexity per type and method estimation.

Patrick from NDepend team
- 13,237
- 6
- 61
- 92

Paul Alexander
- 31,970
- 14
- 96
- 151
-
1+1 for NDepend. Has a learning curve but you get a in depth look at your code. – Robert Kozak May 19 '09 at 19:38
7
We are using SourceMonitor. It's free, very easy to use and easy to integrate with a CI server.

Juanma
- 3,961
- 3
- 27
- 26
0
There is a free plugin for Red Gate's .NET Reflector called CodeMetrics that does this.

Kenneth Cochran
- 11,954
- 3
- 52
- 117
0
DevExpress's Refactor Pro does that. It has a free trial, so you may want to give it a shot.

Mike_G
- 16,237
- 14
- 70
- 101