In Visual Studio 2010 Premium and Ultimate, you can go to the Analyze tab and select "Calculate Code Metrics", it gives you lines of code as well as a maintainability index, cyclomatic complexity, depth of inheritance and class coupling metrics, project by project.
You can drill into namespaces and classes/interfaces as well.