and using “Classic” .NET Framework Invocation, nevertheless we obtain the same result: The main branch of this project is empty.
SonarQube version is 9.4.0.54424
Scanner versioni is “SonarScanner for MSBuild 5.5.3”
Thanks for sharing your logs. When I look at sonar_build.log I see a lot of references to .csproj files, but no(?) .cs files…?
By default, analysis recognizes files with a .cs extension as C# code files. If you’re using a non-standard extension, you’ll need to tell SonarQube what to look for. You can do that at the global or project level via the UI ([Global] Administration → Languages → C# → File suffixes, or Project Settings → General Settings → Languages → (&etc). You could also pass this as an analysis property, but IMO the UI is the better course here.
Hi Ann,
the project contains files with a .cs extension. The .csproj file list them. Sonar see them as you can see in the attached image.
Please, let me know.
Best,
L. Cattura.zip (18.6 KB)
Given that your project has “Test” in the name, I suspect it’s being treated as a test project & thus no “Lines of Code” are detected (instead, they’re seen as lines of test code). This may help.