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
LVL 1
LeighWardleAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Chinmay PatelChief Technology NinjaCommented:
Hi Leigh,

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

Regards,
Chinmay.
LeighWardleAuthor Commented:
Hi Chimnay,

I have VS 2013 Professional.

My Project menu does not have Analyze on it?

Regards,
Leigh
LeighWardleAuthor Commented:
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
Fundamentals of JavaScript

Learn the fundamentals of the popular programming language JavaScript so that you can explore the realm of web development.

LeighWardleAuthor Commented:
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
Chinmay PatelChief Technology NinjaCommented:
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.
LeighWardleAuthor Commented:
Hi Chinmay,

Here is my Project menu:

VS2013 Project Menu
PS How do I determine what .Net Framework is required?

Regards,
Leigh
Chinmay PatelChief Technology NinjaCommented:
Hi Leigh,

Not Project Menu. In Solution Explorer -> Right Click on the Project (See the screen-shot below). On Project Menu, if you right click it will open Window's Context Menu.

In Visual Studio - > Solution Explorer -> Right Click on Project -> Analyze -> Calculate Code Metrics
.Net Framework can be determined by analyzing the installer but instead of that I would suggest just install 4.5. If that does not work, will take the analysis route (which can be bit tricky and time consuming).

Regards,
Chinmay.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
LeighWardleAuthor Commented:
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
Chinmay PatelChief Technology NinjaCommented:
Thank you very much Leigh for making my day :)
You get full marks for persistence!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.