Hello, I am receiving the following error when trying to close a scan, please support me to troubleshoot it. I have reviewed the forums, included verbose output and attached a copy of the .sonarcube folder.
dotsonarqube.zip (920.8 KB)
The SonarScanner for MSBuild integration failed: SonarQube was unable to collect the required information about your projects.
Possible causes:
- The project has not been built - the project must be built in between the begin and end steps.
- An unsupported version of MSBuild has been used to build the project. Supported versions: MSBuild 16 and higher.
- The begin, build and end steps have not all been launched from the same folder.
- None of the analyzed projects have a valid ProjectGuid and you have not used a solution (.sln).
10:21:37.82 Generation of the sonar-properties file failed. Unable to complete the analysis.
10:21:37.82 Post-processing failed. Exit code: 1
RE:Error causes examination:
- project successfully builds
- MSBuild 16 used but no 16 folder under C:\Program Files (x86)\MSBuild or C:\Users\redacted\AppData\Local\Microsoft\MSBuild
- All 3 steps launched from same folder containing the .sln file
- .sln solution file used
Community EditionVersion 9.9.4 (build 87374)
SonarScanner for MSBuild 6.2 deployed via zip
Microsoft Build Engine version 16.11.2+f32259642 for .NET Framework not confirmed in C:\Program Files (x86)\MSBuild path
Trying to achieve code analysis via local build of .NetFramework application
So far the begin and build steps are successful however the end step fails.
PS D:\github\oee> SonarScanner.MSBuild.exe begin /k:“LocalDevelopment_redacted_OEE” /d:sonar.host.url=“https://redacted/sonarqube” /d:sonar.login=“redacted”
SonarScanner for MSBuild 6.2
Using the .NET Framework version of the Scanner for MSBuild
Pre-processing started.
Preparing working directories…
10:19:00.471 Updating build integration targets…
10:19:01.364 Fetching analysis configuration settings…
10:19:02.22 Provisioning analyzer assemblies for cs…
10:19:02.22 Installing required Roslyn analyzers…
10:19:02.235 Processing plugin: csharp version 8.51.0.59060
10:19:02.282 Processing plugin: vbnet version 8.51.0.59060
10:19:02.551 Provisioning analyzer assemblies for vbnet…
10:19:02.551 Installing required Roslyn analyzers…
10:19:02.551 Processing plugin: csharp version 8.51.0.59060
10:19:02.551 Processing plugin: vbnet version 8.51.0.59060
10:19:02.567 Incremental PR analysis: Base branch parameter was not provided.
10:19:02.567 Cache data is empty. A full analysis will be performed.
10:19:02.589 Pre-processing succeeded.
PS D:\github\oee> MsBuild.exe /t:Rebuild
Microsoft (R) Build Engine version 16.11.2+f32259642 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 7/2/2024 10:19:59 AM.
Project “D:\github\oee\OEE.sln” on node 1 (Rebuild target(s)).
ValidateSolutionConfiguration:
Building solution configuration “Debug|Any CPU”.
Project “D:\github\oee\OEE.sln” (1) is building “D:\github\oee\OEE.metaproj” (2) on node 1 (Rebuild target(s)).
Rebuild:
Copying file from “D:\github\OEE\packages\ClosedXML.0.94.2\lib\net46\ClosedXML.dll” to “D:\github\OEE\Bin\ClosedXML.d
ll”.
Copying file from “D:\github\OEE\packages\ExcelNumberFormat.1.0.3\lib\net20\ExcelNumberFormat.dll” to “D:\github\OEE
Bin\ExcelNumberFormat.dll”.
Copying file from “D:\github\OEE\packages\DocumentFormat.OpenXml.2.7.2\lib\net46\DocumentFormat.OpenXml.xml” to “D:\g
ithub\OEE\Bin\DocumentFormat.OpenXml.xml”.
Copying file from “D:\github\OEE\packages\ClosedXML.0.94.2\lib\net46\ClosedXML.xml” to “D:\github\OEE\Bin\ClosedXML.x
ml”.
Copying file from “D:\github\OEE\packages\DocumentFormat.OpenXml.2.7.2\lib\net46\DocumentFormat.OpenXml.dll” to “D:\g
ithub\OEE\Bin\DocumentFormat.OpenXml.dll”.
Copying file from “D:\github\OEE\packages\ExcelNumberFormat.1.0.3\lib\net20\ExcelNumberFormat.xml” to “D:\github\OEE
Bin\ExcelNumberFormat.xml”.
Copying file from “D:\github\OEE\packages\ClosedXML.0.94.2\lib\net46\ClosedXML.pdb” to “D:\github\OEE\Bin\ClosedXML.p
db”.
Copying file from “D:\github\OEE\packages\Iron.Assets.Rendering.Windows.16.0.0\lib\net40\IronPdf.Assets.Rendering.Win
dows.dll” to “D:\github\OEE\Bin\IronPdf.Assets.Rendering.Windows.dll”.
Copying file from “D:\github\OEE\packages\FastMember.1.3.0\lib\net45\FastMember.dll” to “D:\github\OEE\Bin\FastMember
.dll”.
Copying file from “D:\github\OEE\packages\IronPdf.2020.1.0\lib\net40\IronPdf.dll” to “D:\github\OEE\Bin\IronPdf.dll”.
Copying file from “D:\github\OEE\packages\iTextSharp.5.5.13.1\lib\itextsharp.dll” to “D:\github\OEE\Bin\itextsharp.dl
l”.
Copying file from “D:\github\OEE\packages\iTextSharp.5.5.13.1\lib\itextsharp.xml” to “D:\github\OEE\Bin\itextsharp.xm
l”.
Copying file from “D:\github\OEE\packages\IronPdf.2020.1.0\lib\net40\IronPdf.xml” to “D:\github\OEE\Bin\IronPdf.xml”.
Copying file from “D:\github\OEE\packages\NReco.PdfGenerator.1.2.0\lib\net45\NReco.PdfGenerator.dll” to “D:\github\OE
E\Bin\NReco.PdfGenerator.dll”.
Copying file from “D:\github\OEE\packages\System.IO.FileSystem.Primitives.4.0.1\lib\net46\System.IO.FileSystem.Primit
ives.dll” to “D:\github\OEE\Bin\System.IO.FileSystem.Primitives.dll”.
Copying file from “D:\github\OEE\packages\System.IO.Packaging.4.0.0\lib\net46\System.IO.Packaging.dll” to “D:\github
OEE\Bin\System.IO.Packaging.dll”.
C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_compiler.exe -v /localhost_62640 -p …\OEE\ -u -f -d Precompiled
Web\localhost_62640
Done Building Project “D:\github\oee\OEE.metaproj” (Rebuild target(s)).
Done Building Project “D:\github\oee\OEE.sln” (Rebuild target(s)).
Build succeeded.
0 Warning(s)
0 Error(s)
Time Elapsed 00:00:22.73
PS D:\github\oee> SonarScanner.MSBuild.exe end /d:sonar.login=“redacted”
SonarScanner for MSBuild 6.2
Using the .NET Framework version of the Scanner for MSBuild
Post-processing started.
10:21:37.82 The SonarScanner for MSBuild integration failed: SonarQube was unable to collect the required information about your projects.
Possible causes:
- The project has not been built - the project must be built in between the begin and end steps.
- An unsupported version of MSBuild has been used to build the project. Supported versions: MSBuild 16 and higher.
- The begin, build and end steps have not all been launched from the same folder.
- None of the analyzed projects have a valid ProjectGuid and you have not used a solution (.sln).
10:21:37.82 Generation of the sonar-properties file failed. Unable to complete the analysis.
10:21:37.82 <
Verbose output:
PS D:\github\oee> SonarScanner.MSBuild.exe begin /k:“LocalDevelopment_redacted_OEE” /d:sonar.host.url=“https://redacted/sonarqube” /d:sonar.login=“sqp_c510ceee9f63b75f3b7c0fa70c5e367d0e7ae3c9” /d:“sonar.verbose=true”
SonarScanner for MSBuild 6.2
Using the .NET Framework version of the Scanner for MSBuild
Default properties file was found at C:\Program Files (x86)\Sonarqube\sonar-scanner-6.2.0.85879-net-framework\SonarQube.Analysis.xml
Loading analysis properties from C:\Program Files (x86)\Sonarqube\sonar-scanner-6.2.0.85879-net-framework\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…
13:12:27.491 13:12:27.491 Loading analysis properties from C:\Program Files (x86)\Sonarqube\sonar-scanner-6.2.0.85879-net-framework\SonarQube.Analysis.xml
13:12:27.491 13:12:27.491 sonar.verbose=true was specified - setting the log verbosity to ‘Debug’
13:12:27.491 Updating build integration targets…
13:12:27.529 The file SonarQube.Integration.ImportBefore.targets is up to date at C:\Users\redacted\AppData\Local\Microsoft\MSBuild\4.0\Microsoft.Common.targets\ImportBefore
13:12:27.529 The file SonarQube.Integration.ImportBefore.targets is up to date at C:\Users\redacted\AppData\Local\Microsoft\MSBuild\10.0\Microsoft.Common.targets\ImportBefore
13:12:27.529 The file SonarQube.Integration.ImportBefore.targets is up to date at C:\Users\redacted\AppData\Local\Microsoft\MSBuild\11.0\Microsoft.Common.targets\ImportBefore
13:12:27.529 The file SonarQube.Integration.ImportBefore.targets is up to date at C:\Users\redacted\AppData\Local\Microsoft\MSBuild\12.0\Microsoft.Common.targets\ImportBefore
13:12:27.529 The file SonarQube.Integration.ImportBefore.targets is up to date at C:\Users\redacted\AppData\Local\Microsoft\MSBuild\14.0\Microsoft.Common.targets\ImportBefore
13:12:27.529 The file SonarQube.Integration.ImportBefore.targets is up to date at C:\Users\redacted\AppData\Local\Microsoft\MSBuild\15.0\Microsoft.Common.targets\ImportBefore
13:12:27.529 The file SonarQube.Integration.ImportBefore.targets is up to date at C:\Users\redacted\AppData\Local\Microsoft\MSBuild\Current\Microsoft.Common.targets\ImportBefore
13:12:27.545 Installed SonarQube.Integration.targets to D:\github\oee.sonarqube\bin\targets
13:12:27.545 Creating config and output folders…
13:12:27.545 Creating directory: D:\github\oee.sonarqube\conf
13:12:27.545 Creating directory: D:\github\oee.sonarqube\out
13:12:27.576 Fetching server version…
13:12:27.591 Downloading from https://redacted/sonarqube/api/server/version…
13:12:28.108 Response received from https://redacted/sonarqube/api/server/version…
13:12:28.115 Checking if the server version is supported…
13:12:28.115 Checking validity of server license…
13:12:28.131 Downloading from https://redacted/sonarqube/api/editions/is_valid_license…
13:12:28.247 Response received from https://redacted/sonarqube/api/editions/is_valid_license…
13:12:28.284 SonarQube Community Edition detected, license is valid.
13:12:28.288 Fetching analysis configuration settings…
13:12:28.289 Fetching properties for project ‘LocalDevelopment_redacted_OEE’…
13:12:28.289 Downloading from https://redacted/sonarqube/api/settings/values?component=LocalDevelopment_redacted_OEE…
13:12:28.423 Response received from https://redacted/sonarqube/api/settings/values?component=LocalDevelopment_redacted_OEE…
13:12:28.439 Downloading from https://redacted/sonarqube/api/languages/list…
13:12:28.552 Response received from https://redacted/sonarqube/api/languages/list…
13:12:28.568 Fetching quality profile for project ‘LocalDevelopment_redacted_OEE’…
13:12:28.568 Downloading from https://redacted/sonarqube/api/qualityprofiles/search?project=LocalDevelopment_redacted_OEE…
13:12:28.717 Response received from https://redacted/sonarqube/api/qualityprofiles/search?project=LocalDevelopment_redacted_OEE…
13:12:28.733 Fetching rules for quality profile ‘AYYHmKs9ClEbQF5qZTQN’…
13:12:28.733 Downloading from https://redacted/sonarqube/api/rules/search?f=repo,name,severity,lang,internalKey,templateKey,params,actives&ps=500&qprofile=AYYHmKs9ClEbQF5qZTQN&p=1…
13:12:29.166 Response received from https://redacted/sonarqube/api/rules/search?f=repo,name,severity,lang,internalKey,templateKey,params,actives&ps=500&qprofile=AYYHmKs9ClEbQF5qZTQN&p=1…
13:12:29.182 Local analyzer cache: C:\Users\redacted\AppData\Local\Temp.sonarqube\resources
13:12:29.198 Writing Roslyn generated ruleset to D:\github\oee.sonarqube\conf\Sonar-cs.ruleset…
13:12:29.198 Writing Roslyn generated ruleset to D:\github\oee.sonarqube\conf\Sonar-cs-none.ruleset…
13:12:29.213 Provisioning analyzer assemblies for cs…
13:12:29.213 Installing required Roslyn analyzers…
13:12:29.22 Processing plugin: csharp version 8.51.0.59060
13:12:29.282 Cache hit: using plugin files from C:\Users\redacted\AppData\Local\Temp.sonarqube\resources\4
13:12:29.282 Processing plugin: vbnet version 8.51.0.59060
13:12:29.282 Cache hit: using plugin files from C:\Users\redacted\AppData\Local\Temp.sonarqube\resources\5
13:12:29.282 Writing Roslyn analyzer additional file to D:\github\oee.sonarqube\conf\cs\SonarLint.xml…
13:12:29.282 Fetching quality profile for project ‘LocalDevelopment_redacted_OEE’…
13:12:29.282 Downloading from https://redacted/sonarqube/api/qualityprofiles/search?project=LocalDevelopment_redacted_OEE…
13:12:29.42 Response received from https://redacted/sonarqube/api/qualityprofiles/search?project=LocalDevelopment_redacted_OEE…
13:12:29.42 Fetching rules for quality profile ‘AYYHmK_-ClEbQF5qZUVi’…
13:12:29.432 Downloading from https://redacted/sonarqube/api/rules/search?f=repo,name,severity,lang,internalKey,templateKey,params,actives&ps=500&qprofile=AYYHmK_-ClEbQF5qZUVi&p=1…
13:12:29.598 Response received from https://redacted/sonarqube/api/rules/search?f=repo,name,severity,lang,internalKey,templateKey,params,actives&ps=500&qprofile=AYYHmK_-ClEbQF5qZUVi&p=1…
13:12:29.598 Local analyzer cache: C:\Users\redacted\AppData\Local\Temp.sonarqube\resources
13:12:29.598 Writing Roslyn generated ruleset to D:\github\oee.sonarqube\conf\Sonar-vbnet.ruleset…
13:12:29.614 Writing Roslyn generated ruleset to D:\github\oee.sonarqube\conf\Sonar-vbnet-none.ruleset…
13:12:29.62 Provisioning analyzer assemblies for vbnet…
13:12:29.62 Installing required Roslyn analyzers…
13:12:29.62 Processing plugin: csharp version 8.51.0.59060
13:12:29.62 Cache hit: using plugin files from C:\Users\redacted\AppData\Local\Temp.sonarqube\resources\4
13:12:29.62 Processing plugin: vbnet version 8.51.0.59060
13:12:29.62 Cache hit: using plugin files from C:\Users\redacted\AppData\Local\Temp.sonarqube\resources\5
13:12:29.62 Writing Roslyn analyzer additional file to D:\github\oee.sonarqube\conf\vbnet\SonarLint.xml…
13:12:29.627 Processing analysis cache
13:12:29.627 Incremental PR analysis: Base branch parameter was not provided.
13:12:29.627 Cache data is empty. A full analysis will be performed.
13:12:29.643 Pre-processing succeeded.
PS D:\github\oee>