views:

367

answers:

4

Is there an easy way to find the number of classes contained within a visual studio solution? Other than writing a funky find script, I couldn't find a way to do it within the code metrics piece of VS.

I am running Visual Studio 2008 and this is a VB.Net project through and through.

thanks!

A: 

Hire an intern to count.

Ben Hoffstein
A: 

I haven't used these tools before, but they probably have some facility that can help you. Basically any code metrics package can help. VS 2008 was supposed to have a built in code metrics tool, but I think it was nixed for one reason or another.

--Edit--
JRoppert is correct. I actually remember reading that the metrics tool was only available in the Team edition, not in Pro or Express

Andrew Burgess
A: 

Don't know a direct way but maybe this will help you:

  • Open MainMenu/View/Other Windows/Code Metric Results
  • Calculate Code Metrics Results
  • Export the Results to Excel
  • Use Excel to get the count of unique Types in the List.

Don't know if the Code Metrics Stuff is available in all Editions of VS. I'm using the Team Suite Edition.

JRoppert
+2  A: 

You could use a free tool like SourceMonitor, which has a reasonable set of metrics including number of classes. You could also use a tool like NDepend which is a lot more powerful, but also costs money. Either can be integrated into your build environment if you're using MSBuild or NAnt.

scott.caligan
SourceMonitor was the most helpful. "It Just Worked" :) NDepend was nice, but looked a bit like over kill for the task at hand. Thanks everyone!
lyngbym