Scanning VB.net project does not ́t publish code result to sonarqube server

I run the analysis with sonar scanner to a web application that is developed in visual basic.net but does not show the results of the code (.vb) on the sonarqube server, it only shows the analysis of the .css files.
The web application is developed in Visual Studio 2017, for the analysis it is used:
SonarScanner_MSBuild-4.6.0.1930
MSBuild 15.0

hi @Jorge_Lino

First :

  • what is the version of SQ?
  • what is the version of the plugin?
  • what are the commands you are running to do the analysis?
  • are you running all commands from the same folder?

Second:

  • please give us the verbose output of the build command msbuild /v:d
  • please give us the verbose output of END command (please run SonarScanner.MSBuild.exe begin /k:“MyProject” /d:sonar.verbose=true as the begin step, and please attach the output of END step)

*** what is the version of SQ?**
7.9.1 lts

*** what is the version of the plugin?**
SonarScanner_MSBuild-4.6.0.1930

*** what are the commands you are running to do the analysis?**
1.-“C:\SonarQube\SonarScanner_MSBuild-4.6.0.1930\SonarScanner.MSBuild.exe” begin /k:“APL_AutoservicioOCP” /d:sonar.host.url=“http://10.1.213.4:9000” /d:sonar.login=“xxxx”
2.-“C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\MsBuild.exe” /t:Rebuild
3.-“C:/SonarQube/SonarScanner_MSBuild-4.6.0.1930/SonarScanner.MSBuild.exe” end /d:sonar.login=“xxxx”

*** are you running all commands from the same folder?**
Yesbegin.txt (7.7 KB) end.txt (914.5 KB) msbuild.txt (260.9 KB)

you marked my post as a solution. do you still have a problem or did you fix it?

Good morning.
I still have the problem; yesterday I sent him the commands that I use for the code analysis with the results of the same.

Hi,

your project seems to be marked as a test project, not a production code. You’re probably referencing some test framework libraries.

Please try to explicitly set your project type as a main code. If you have SonarLint installed, right click on the project(s) and select SonarLint connected mode/Set project type/Non-Test project.

If you don’t have SonarLint, add this to your *.vbproj file(s) for production code:

  <PropertyGroup>
    <SonarQubeTestProject>False</SonarQubeTestProject>
  </PropertyGroup>

Please let us know if it helps.

1 Like

It works thank you.:+1::+1:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.