We just migrated our code base from .NET framework (using msbuild) to .NET 6 and are now using the dotnet tooling to build and run tests. Since the change, a number of our projects show up with zero LOC in SonarCloud, throwing off our coverage stats.
Because it’s part of our CI pipeline, the directory is wiped before every build, so I shouldn’t need to do this. But, I will try it and see if it makes a difference.
However, I did find that a number of large xml files are now part of our solution because of how NET SDK style projects include everything in the folder by default. I went through and excluded *.xml from the projects analysis and now the LOC is much more in line with what Visual studio reports.
Still have some of our largest Assemblies that report zero “Lines of Code” in the code view. Which is very strange, since if I drill down the hierarchy, there is clearly code there.