Visual Studio

Count the LOC Of .NET application by Visual Studio Professional

Code Metrics is a tool which can be used to find complex and unmaintainable areas within your .NET applications.

In my previous article How to use Code Metrics tool to Count Lines of Code (LOC) in .NET application from Visual Studio, we saw the usage of Code Metrics tool.

This article will be answer to the questions like how to measure C# loc , how to measure vb.net loc etc.

As mentioned in that article this tool will not work directly with Visual Studio Professional edition. But still, we can use Code Metrics with VS professional.

See the step by step procedure for using Code Metrics tool to Count the Lines of Code (LOC) in .NET application from Visual Studio Professional edition.

Count the Lines of Code in .NET application from Visual Studio Professional

Download and Install the Code Metrics Power Tool 10.0 exe from here.

Download and install the Code Metrics Viewer 2010 VsCodeMetrics.msix from here.

1)   Go to Visual Studio >> Tools >> Options >> Code Metrics >> Tools

You will see the window as below

2)   Go right side of the window and Browse the Code Metrics Power Tool path. This is normally at location

C:\Program Files\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop

[ Make sure that you have Metrics.exe inside this folder path ]

3)   Select the FxCop and click OK.

4)   Open your solution in Visual Studio which you need to analyze using Code Metrics

5)   Right-click on the solution and select the context menu option “Code Metrics Viewer”.

6)   Inside Code Metrics Viewer window Click the Analyze Solution button.

You may be Interested in reading Count the Lines of Code (LOC) in .NET application also

Hope this article helped you in understanding  how to measure C# loc and  how to count no of lines of any .net application from visual studio professional edition.Leave your feedback in the comment section below.

Rajeev

Recent Posts

OWIN Authentication in .NET Core

OWIN (Open Web Interface for .NET) is an interface between web servers and web applications…

2 years ago

Serializing and Deserializing JSON using Jsonconvertor in C#

JSON (JavaScript Object Notation) is a commonly used data exchange format that facilitates data exchange…

2 years ago

What is CAP Theorem? | What is Brewer’s Theorem?

The CAP theorem is also known as Brewer's theorem. What is CAP Theorem? CAP theorem…

2 years ago

SOLID -Basic Software Design Principles

Some of the Key factors that need to consider while architecting or designing a software…

2 years ago

What is Interface Segregation Principle (ISP) in SOLID Design Principles?

The Interface Segregation Principle (ISP) is one of the SOLID principles of object-oriented design. The…

2 years ago

What is Single Responsibility Principle (SRP) in SOLID Design Priciples?

The Single Responsibility Principle (SRP), also known as the Singularity Principle, is a software design…

2 years ago