Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3277930
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T19:25:29+00:00 2026-05-17T19:25:29+00:00

I wanted to ask whether you know about some free C# libraries (dlls) that

  • 0

I wanted to ask whether you know about some free C# libraries (dlls) that calculate CK metrics (mainly Cyclomatic Complexity).

I would need that for a project I’m planning to do. I know that there are already some finished solutions that calculate CK metrics and display it to you in various forms, but what I would need is one that I could use from within my application. So before starting and writing one myself I first wanted to ask you.

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T19:25:30+00:00Added an answer on May 17, 2026 at 7:25 pm

    DrivenMetrics is a open source C# command line tool. The core functionalities are isolated from the command line console client as a library (Core project is available here).

    Even if quite simple, it may fit your need: it’s free, counts the the number of lines and calculates the cyclomatic complexity (number of potential code paths) of methods.

    This is performed through direct analysis of the IL thanks to Mono.Cecil (the same library NDepend relies on). This allows the analysis to be performed on assemblies built from code written in C#, VB.Net,…

    • The project has been announced
      here.
    • The code source is
      available on github.
    • A packaged release is also available.
    • It works both on Windows and Mono.

    UPDATE:

    Another option would be the amazing Gendarme, a static analysis tool from the Mono project.

    As a sample of usage, the code below display the cyclomatic complexity of every method in an assembly.

    ModuleDefinition module = ModuleDefinition.ReadModule(fullPathToTheAssembly);
    
    foreach (var type in module.Types)
    {
        foreach (var me in type.Methods)
        {
            if (!me.HasBody || me.IsGeneratedCode() || me.IsCompilerControlled)
                continue;
            var r = AvoidComplexMethodsRule.GetCyclomaticComplexity(me);
    
            Console.WriteLine("{0}: {1}", me.ToString(), r);
        }
    }
    • The project is described here
    • The code source is available on github
    • Packaged releases are also available
    • It works both on Windows and Mono
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wanted to ask whether there's a control like a big grid calendar that
I have a block of code that works and I wanted to ask what
We are having some performance issues with a page and I wanted to ask
I know this is somewhat of a server question, but I wanted to ask
After reading an article about the subject from O'Reilly , I wanted to ask
I wanted some of those spiffy rounded corners for a web project that I'm
I just wanted to know whether it is possible to pass geocoords to the
I wanted to ask whether the following statement where printf() has been provided with
I wanted to ask what known existing Python 2.x libraries there are for parsing
Before asking for specific code examples, I just wanted to ask whether it is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.