Problem analysing with Scanner for MSBuild4.8

Hello,
I’m using sonarqube to analysis VB and C# core project on windows.
I’ve built the project between begin and end steps, all steps (begin, build, end) has been launched from the same folder.

Information
sonarqube-8.2.0.32929 from https://www.sonarqube.org/downloads/
Msbuild 4.8 from https://github.com/SonarSource/sonar-scanner-msbuild/releases

Command 1

F:\usports_project>SonarScanner.MSBuild.exe begin /k:"K3" /d:sonar.host.url="http://localhost:9000" /d:sonar.login="0180a4be7dfca9019f31de5fe15c027ba8f1b88f" /d:verbose=true /d:sonar.verbose=true
SonarScanner for MSBuild 4.8
Using the .NET Framework version of the Scanner for MSBuild
Default properties file was found at F:\Workspace\SonarQube.Analysis.xml
Loading analysis properties from F:\Workspace\SonarQube.Analysis.xml
sonar.verbose=true was specified - setting the log verbosity to 'Debug'
Pre-processing started.
Preparing working directories...
Using environment variables to determine the download directory...
02:40:23.704  02:40:23.688  Loading analysis properties from F:\Workspace\SonarQube.Analysis.xml
02:40:23.719  02:40:23.704  sonar.verbose=true was specified - setting the log verbosity to 'Debug'
02:40:23.719  Updating build integration targets...
02:40:23.75  The file SonarQube.Integration.ImportBefore.targets is up to date at C:\Users\Ken\AppData\Local\Microsoft\MSBuild\4.0\Microsoft.Common.targets\ImportBefore
02:40:23.75  The file SonarQube.Integration.ImportBefore.targets is up to date at C:\Users\Ken\AppData\Local\Microsoft\MSBuild\10.0\Microsoft.Common.targets\ImportBefore
02:40:23.75  The file SonarQube.Integration.ImportBefore.targets is up to date at C:\Users\Ken\AppData\Local\Microsoft\MSBuild\11.0\Microsoft.Common.targets\ImportBefore
02:40:23.75  The file SonarQube.Integration.ImportBefore.targets is up to date at C:\Users\Ken\AppData\Local\Microsoft\MSBuild\12.0\Microsoft.Common.targets\ImportBefore
02:40:23.766  The file SonarQube.Integration.ImportBefore.targets is up to date at C:\Users\Ken\AppData\Local\Microsoft\MSBuild\14.0\Microsoft.Common.targets\ImportBefore
02:40:23.766  The file SonarQube.Integration.ImportBefore.targets is up to date at C:\Users\Ken\AppData\Local\Microsoft\MSBuild\15.0\Microsoft.Common.targets\ImportBefore
02:40:23.782  The file SonarQube.Integration.ImportBefore.targets is up to date at C:\Users\Ken\AppData\Local\Microsoft\MSBuild\Current\Microsoft.Common.targets\ImportBefore
02:40:23.797  Installed SonarQube.Integration.targets to F:\usports_project\.sonarqube\bin\targets
02:40:23.797  Creating config and output folders...
02:40:23.797  Creating directory: F:\usports_project\.sonarqube\conf
02:40:23.797  Creating directory: F:\usports_project\.sonarqube\out
02:40:23.828  Fetching analysis configuration settings...
02:40:23.828  Downloading from http://localhost:9000/api/server/version...
02:40:23.875  Fetching properties for project 'K3' from http://localhost:9000/api/settings/values?component=K3...
02:40:23.891  Downloading from http://localhost:9000/api/settings/values?component=K3...
02:40:24.001  Downloading from http://localhost:9000/api/languages/list...
02:40:24.016  Fetching quality profile for project 'K3' from http://localhost:9000/api/qualityprofiles/search?projectKey=K3...
02:40:24.016  Downloading from http://localhost:9000/api/qualityprofiles/search?projectKey=K3...
02:40:24.078  Fetching active rules for quality profile 'AXDPT20iDn2W2j9k04qf' from http://localhost:9000/api/rules/search?f=repo,name,severity,lang,internalKey,templateKey,params,actives&ps=500&activation=true&qprofile=AXDPT20iDn2W2j9k04qf&p=1...
02:40:24.078  Downloading from http://localhost:9000/api/rules/search?f=repo,name,severity,lang,internalKey,templateKey,params,actives&ps=500&activation=true&qprofile=AXDPT20iDn2W2j9k04qf&p=1...
02:40:24.376  Fetching rules not active in quality profile 'AXDPT20iDn2W2j9k04qf' for language 'cs' from http://localhost:9000/api/rules/search?f=repo,name,severity,lang,internalKey,templateKey,params&ps=500&activation=false&qprofile=AXDPT20iDn2W2j9k04qf&p=1&languages=cs...
02:40:24.391  Downloading from http://localhost:9000/api/rules/search?f=repo,name,severity,lang,internalKey,templateKey,params&ps=500&activation=false&qprofile=AXDPT20iDn2W2j9k04qf&p=1&languages=cs...
02:40:24.563  Local analyzer cache: C:\Users\Ken\AppData\Local\Temp\.sonarqube\resources
02:40:24.579  Writing Roslyn generated ruleset to F:\usports_project\.sonarqube\conf\SonarQubeRoslyn-cs.ruleset...
02:40:24.626  Writing Roslyn generated ruleset to F:\usports_project\.sonarqube\conf\SonarQubeRoslyn-cs-test.ruleset...
02:40:24.642  Provisioning analyzer assemblies for cs...
02:40:24.642  Installing required Roslyn analyzers...
02:40:24.657  Processing plugin: csharp version 8.4.0.15306
02:40:24.781  Cache hit: using plugin files from C:\Users\Ken\AppData\Local\Temp\.sonarqube\resources\4
02:40:24.797  Processing plugin: vbnet version 8.4.0.15306
02:40:24.797  Cache hit: using plugin files from C:\Users\Ken\AppData\Local\Temp\.sonarqube\resources\5
02:40:24.797  Writing Roslyn analyzer additional file to F:\usports_project\.sonarqube\conf\cs\SonarLint.xml...
02:40:24.813  Fetching quality profile for project 'K3' from http://localhost:9000/api/qualityprofiles/search?projectKey=K3...
02:40:24.828  Downloading from http://localhost:9000/api/qualityprofiles/search?projectKey=K3...
02:40:24.891  Fetching active rules for quality profile 'AXDPT3KgDn2W2j9k05DL' from http://localhost:9000/api/rules/search?f=repo,name,severity,lang,internalKey,templateKey,params,actives&ps=500&activation=true&qprofile=AXDPT3KgDn2W2j9k05DL&p=1...
02:40:24.891  Downloading from http://localhost:9000/api/rules/search?f=repo,name,severity,lang,internalKey,templateKey,params,actives&ps=500&activation=true&qprofile=AXDPT3KgDn2W2j9k05DL&p=1...
02:40:25.047  Fetching rules not active in quality profile 'AXDPT3KgDn2W2j9k05DL' for language 'vbnet' from http://localhost:9000/api/rules/search?f=repo,name,severity,lang,internalKey,templateKey,params&ps=500&activation=false&qprofile=AXDPT3KgDn2W2j9k05DL&p=1&languages=vbnet...
02:40:25.063  Downloading from http://localhost:9000/api/rules/search?f=repo,name,severity,lang,internalKey,templateKey,params&ps=500&activation=false&qprofile=AXDPT3KgDn2W2j9k05DL&p=1&languages=vbnet...
02:40:25.141  Local analyzer cache: C:\Users\Ken\AppData\Local\Temp\.sonarqube\resources
02:40:25.141  Writing Roslyn generated ruleset to F:\usports_project\.sonarqube\conf\SonarQubeRoslyn-vbnet.ruleset...
02:40:25.141  Writing Roslyn generated ruleset to F:\usports_project\.sonarqube\conf\SonarQubeRoslyn-vbnet-test.ruleset...
02:40:25.156  Provisioning analyzer assemblies for vbnet...
02:40:25.156  Installing required Roslyn analyzers...
02:40:25.156  Processing plugin: csharp version 8.4.0.15306
02:40:25.156  Cache hit: using plugin files from C:\Users\Ken\AppData\Local\Temp\.sonarqube\resources\4
02:40:25.156  Processing plugin: vbnet version 8.4.0.15306
02:40:25.156  Cache hit: using plugin files from C:\Users\Ken\AppData\Local\Temp\.sonarqube\resources\5
02:40:25.172  Writing Roslyn analyzer additional file to F:\usports_project\.sonarqube\conf\vbnet\SonarLint.xml...

Command 2

F:\usports_project>MsBuild.exe /t:Rebuild
Microsoft (R) Build Engine version 16.4.0+e901037fe for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
Building the projects in this solution one at a time. To enable parallel build, please add the "-m" switch.
Build started 3/18/2020 2:41:23 AM.
Project "F:\usports_project\usports_project.sln" on node 1 (Rebuild target(s)).
ValidateSolutionConfiguration:
  Building solution configuration "Debug|Any CPU".
Project "F:\usports_project\usports_project.sln" (1) is building "F:\usports_project\Usports.metaproj" (2) on node 1 (R
ebuild target(s)).
Rebuild:
  C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_compiler.exe -v /Usports -p Usports\ -u -f -d PrecompiledWeb\Usports\
Done Building Project "F:\usports_project\Usports.metaproj" (Rebuild target(s)).
Done Building Project "F:\usports_project\usports_project.sln" (Rebuild target(s)).
Build succeeded.
    107 Warning(s)
    0 Error(s)
Time Elapsed 00:00:24.68

Command 3

F:\usports_project>SonarScanner.MSBuild.exe end /d:sonar.login="0180a4be7dfca9019f31de5fe15c027ba8f1b88f"
SonarScanner for MSBuild 4.8
Using the .NET Framework version of the Scanner for MSBuild
Post-processing started.
02:44:27.814  02:44:27.798  Uninstalling target: C:\Users\Ken\AppData\Local\Microsoft\MSBuild\4.0\Microsoft.Common.targets\ImportBefore\SonarQube.Integration.ImportBefore.targets
02:44:27.814  02:44:27.798  Uninstalling target: C:\Users\Ken\AppData\Local\Microsoft\MSBuild\10.0\Microsoft.Common.targets\ImportBefore\SonarQube.Integration.ImportBefore.targets
02:44:27.814  02:44:27.798  Uninstalling target: C:\Users\Ken\AppData\Local\Microsoft\MSBuild\11.0\Microsoft.Common.targets\ImportBefore\SonarQube.Integration.ImportBefore.targets
02:44:27.814  02:44:27.798  Uninstalling target: C:\Users\Ken\AppData\Local\Microsoft\MSBuild\12.0\Microsoft.Common.targets\ImportBefore\SonarQube.Integration.ImportBefore.targets
02:44:27.814  02:44:27.798  Uninstalling target: C:\Users\Ken\AppData\Local\Microsoft\MSBuild\14.0\Microsoft.Common.targets\ImportBefore\SonarQube.Integration.ImportBefore.targets
02:44:27.829  02:44:27.798  Uninstalling target: C:\Users\Ken\AppData\Local\Microsoft\MSBuild\15.0\Microsoft.Common.targets\ImportBefore\SonarQube.Integration.ImportBefore.targets
02:44:27.829  02:44:27.798  Uninstalling target: C:\Users\Ken\AppData\Local\Microsoft\MSBuild\Current\Microsoft.Common.targets\ImportBefore\SonarQube.Integration.ImportBefore.targets
02:44:27.829  02:44:27.814  sonar.verbose=true was specified - setting the log verbosity to 'Debug'
02:44:27.829  Loading the SonarQube analysis config from F:\usports_project\.sonarqube\conf\SonarQubeAnalysisConfig.xml
02:44:27.829  Not running under TeamBuild
02:44:27.829  Analysis base directory: F:\usports_project\.sonarqube
Build directory:
Bin directory: F:\usports_project\.sonarqube\bin
Config directory: F:\usports_project\.sonarqube\conf
Output directory: F:\usports_project\.sonarqube\out
Config file: F:\usports_project\.sonarqube\conf\SonarQubeAnalysisConfig.xml
Generating SonarQube project properties file to F:\usports_project\.sonarqube\out\sonar-project.properties
The SonarQube MSBuild integration failed: SonarQube was unable to collect the required information about your projects.
Possible causes:
  1. The project has not been built - the project must be built in between the begin and end steps
  2. An unsupported version of MSBuild has been used to build the project. Currently MSBuild 14.0.25420.1 and higher are supported.
  3. The begin, build and end steps have not all been launched from the same folder
  4. None of the analyzed projects have a valid ProjectGuid and you have not used a solution (.sln)
Writing processing summary to F:\usports_project\.sonarqube\out\ProjectInfo.log
Generation of the sonar-properties file failed. Unable to complete SonarQube analysis.
02:44:27.892  Post-processing failed. Exit code: 1

Can anyone suggest?

hey @roklul and welcome to our community!

regarding the error message

  1. None of the analyzed projects have a valid ProjectGuid and you have not used a solution (.sln)

Do your projects have a GUID specified inside? The Scanner for MSBuild needs projects with GUIDs, as you can read in the docs.

To help us diagnose the problem, please upload the contents of the F:\usports_project\.sonarqube\conf folder

Hi @Andrei_Epure

Thank for your reply,

Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Usports", "Usports\Usports\Usports.vbproj", "{FB987682-88F8-4CC4-8603-4F11520CC6CC}"
EndProject
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Usport1", "Usports\Usport1\Usport1.vbproj", "{7965ECC6-40E4-44DC-984E-A45C42866E8E}"
EndProject 

F:\usports_project.sonarqube\conf folder

I have uploaded conf folder in hyerlink.
https://reurl.cc/rxaWeZ

Thank you for help.

sorry for the delay. I didn’t see something in the conf.

can you run the command in debug mode and upload the logs?

to get the debug verbose logs, you need to use the sonar.verbose property in the begin step (e.g. SonarScanner.MSBuild.exe begin /k:"My_Project" /d:sonar.verbose=true ... )