SonarQube version 7.9.1
SonarQube MSBuild scanner version: 4.6.2.2108
Currently, we are having problem a project that show no analysis after build and scan. Logs are showed as success and I could not see any problems. But in the Overview page, it only shows “The main branch has no code” even though there are some in the Code tab page. Please help!
From the logs, it looks like there is only one MSBuild project file and it contains both product and test code. This is causing the scanner to treat it all as test code, leading to warning about there being no code (and presumably no issues reported in SonarQube either).
See this thread for more information about how the categorisation of code as test/product code is currently done by the Scanner for MSBuild, and how to tell the scanner to treat the whole project file as source code.
Did not hear back from our devs yet. But we had a similar issue with MF Cobol application, and we fixed that by adding file suffixes (.pco) to COBOL language.