How to setup for console application

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
    SonarQube: 8.4.2
    Bitbucket: 6.6.2
    SonarScanner: 4.4

  • what are you trying to achieve?
    I’m trying to analyze the Dot Net Console Application

  • what have you tried so far to achieve this
    Followed the setup document provided by SonarQube.

  • what is the issue?
    No code lines are found in the SonarQube server.

You can find the build log at BuildLog_9.log (825.3 KB)

Please let me know can we set up the analysis on console applications?
Note: For Console applications .exe file will be created instead of .dll files

Your build log has hundreds of warnings like the following:

CSC : warning CS8032: An instance of analyzer SonarAnalyzer.Rules.CSharp.SwitchDefaultClauseEmpty cannot be created from C:\TeamCity\BuildAgent\temp\buildTmp\.sonarqube\resources\0\SonarAnalyzer.CSharp.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

That suggests the version of MSBuild installed on your build agent is too old. You need version MSBuild v14.0.25420.1 or higher.