安装Git, 到项目目录下右击->Git Bash, 输入命令: find . -name "*.cs" | xargs wc -l 效果如下, 还是挺简便的. 转载于:https://www.cnblogs.com/Freeway/p/git_calculate_code_lines.html