Avatar of Mashael albarak
Mashael albarak
 asked on

Total line of code in c# web project

Hello,
 I have not worked with Visual Studio before ever , I want to know how do I know the total line of code in a C# web project in VS 2015

Best regard
C#Microsoft Visual StudioASP.NET.NET ProgrammingWeb Development

Avatar of undefined
Last Comment
Frank Helk

8/22/2022 - Mon
Scott McDaniel (EE MVE )

Easiest way is to use the Code Metrics extension, if you're using a paid version of VS. If not, this blog suggests a Find with a regular expression:

https://www.codeproject.com/Articles/625710/Line-Counting-Trickery-within-Visual-Studio
Naitik Gamit

Mashael albarak

ASKER
I have VS 2015 community , its free not paid release
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
ASKER CERTIFIED SOLUTION
DansDadUK

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Mashael albarak

ASKER
Will it includes also the comments lines ??? Becasue i dont want to include the comments code
DansDadUK

>> ... Will it includes also the comments lines ?

I've no idea - but I doubt that comment lines will be included if the value is estimated by examining IL Code.

Try it with a small test solution, and find out (then let the rest of us know the answer!).
Mashael albarak

ASKER
Well thats the problem I dont know how to create a new solution file , this is my first time ever Working with visual studio ,, can someone do me a favour and test if the code metric line of code will include the comments line ???
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Scott McDaniel (EE MVE )

I dont know how to create a new solution file
Use File >> New Project. Add a module with a few comment lines, and a function/sub or two, then see what happens.
DansDadUK

As far as I'm aware (I use WPF projects, not Web projects), when you add a new project (via File | New | Project) a new Solution (default name based on the project name) is automatically created.
Mashael albarak

ASKER
I' m an oracle database person I dont kknow how to create functions , please help
Your help has saved me hundreds of hours of internet surfing.
fblack61
Mashael albarak

ASKER
Can someone just create a small solutiin file in test if the line of code metric will include the comments
Scott McDaniel (EE MVE )

Can someone just create a small solutiin file in test if the line of code metric will include the comments
This is the trouble with volunteer communities - YOU don't have the time to do it, but you expect US to stop what we're doing and do your job for you.

At most, it would take 5 minutes to create a new solution file, add a module, add a sub/function, and then run the metrics.
Mashael albarak

ASKER
Its not that I dont have the time , its I DONT  KNOW HOW to do it, how to create a function , what to write in the function ??
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
DansDadUK

Visual Studio provides plenty of Help topics, as do other 'programming' web sites.

The best way to learn about something is to do a bit of research, then try something, then a bit more research, ...
Mashael albarak

ASKER
Thank you for your help
DansDadUK

The MSDN web site includes hundreds of sample projects to help you on your way - see https://code.msdn.microsoft.com/
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
SOLUTION
DansDadUK

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Mashael albarak

ASKER
Ok thank you very much
Frank Helk

No comment has been added to this question in more than 21 days, so it is now classified as abandoned.

I have recommended this question be closed as follows:

Split:
-- DansDadUK (https:#a42083380)
-- DansDadUK (https:#a42083548)


If you feel this question should be closed differently, post an objection and the moderators will review all objections and close it as they feel fit. If no one objects, this question will be closed automatically the way described above.

frankhelk
Experts-Exchange Cleanup Volunteer