Link to home
Start Free TrialLog in
Avatar of LeighWardle
LeighWardleFlag for Australia

asked on

Visual Studio 2013 - source code line counts for functions and subs

Hi Experts,

I'm using Visual Studio 2013 (yes, am roaming with the dinosaurs!) for VB development.

I would like to know the line count for each function and sub, broken down by module.
It would also be nice to be able to sort the results by line count.

Is there a free or inexpensive tool that will do this?

Regards,
Leigh
Avatar of Chinmay Patel
Chinmay Patel
Flag of India image

Hi Leigh,

In Visual Studio, Right Click On Project -> Analyze -> Calculate Code Metrics.

Regards,
Chinmay.
Avatar of LeighWardle

ASKER

Hi Chimnay,

I have VS 2013 Professional.

My Project menu does not have Analyze on it?

Regards,
Leigh
Hi Chimnay,

I found this:

Code Metrics Viewer 2013 by Matthias Friedrich

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

I will try it and let you know...

Regards,
Leigh
Hi Chimnay,

I tried installing Code Metrics Viewer 2013 by Matthias Friedrich

Bad news - installation failed.

The log says:

Install Error : Microsoft.VisualStudio.ExtensionManager.MissingTargetFrameworkException: The extension 'Code Metrics Viewer 2013' requires a version of the .NET Framework that is not installed.

I give up!

Regards,
Leigh

Regards,
Leigh
Hi Leigh,

Don't give up that easily. I am sorry I thought the code metrics was there even before the VS2015 came out. Can you right click on your project, take a screenshot and send it over? I just want to check if it is hidden under some other menu item.

1. Install Code Metrics Powertool for Visual Studio 2013 : https://www.microsoft.com/en-in/download/details.aspx?id=41647
2. You can get any .Net Framework you want from here: https://dotnet.microsoft.com/download. Install .Net Framework 4.5.1 from there, you can go with runtime, no need to get the Dev pack.

Regards,
Chinmay.
Hi Chinmay,

Here is my Project menu:

User generated image
PS How do I determine what .Net Framework is required?

Regards,
Leigh
ASKER CERTIFIED SOLUTION
Avatar of Chinmay Patel
Chinmay Patel
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks Chinmay,

You get full marks for persistence!

I also found the top level Menu ANALYSIS also has Calculate Code Metrics on it.

Regards,
Leigh
Thank you very much Leigh for making my day :)
You get full marks for persistence!