hi everyone i am having problem when scanning c# msbuild, after successful scan, on sonar server does not show bug, check in code menu, line of code = _
bat 'call SonarScanner.MSBuild.exe ’ +
"begin /k:${project} " +
"/n:${project} " +
"/d:sonar.login=${token_sonarqube} " +
"/v:${currentBuild.number} " +
"/d:sonar.host.url=${sonar_host_url} " +
‘/d:sonar.sourceEncoding=UTF-8’
bat “call C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/MSBuild/Current/Bin/MSBuild.exe” “C:/jenkins/workspace/ad/ad.sln” /restore /t:Rebuild "
bat “call SonarScanner.MSBuild.exe /d:sonar.login=${token_sonarqube} end”
không hiển thị bug
Hi,
Welcome to the community!
Can you share your analysis logs?
Ann
SonarScanner for MSBuild 4.7.1
Using the .NET Framework version of the Scanner for MSBuild
Post-processing started.
WARNING: File 'C:\jenkins\workspace\FDN.FIN5.Pavaso.UX2.0\test-sonar\packages\NUnitTestAdapter.2.3.0\build\NUnit.VisualStudio.TestAdapter.dll' is not located under the root directory 'C:\jenkins\workspace\FDN.FIN5.Pavaso.UX2.0\test-sonar\PVS2' and will not be analyzed.
WARNING: File 'C:\jenkins\workspace\FDN.FIN5.Pavaso.UX2.0\test-sonar\packages\NUnitTestAdapter.2.3.0\build\Mono.Cecil.dll' is not located under the root directory 'C:\jenkins\workspace\FDN.FIN5.Pavaso.UX2.0\test-sonar\PVS2' and will not be analyzed.
WARNING: File 'C:\jenkins\workspace\FDN.FIN5.Pavaso.UX2.0\test-sonar\packages\NUnitTestAdapter.2.3.0\build\Mono.Cecil.Mdb.dll' is not located under the root directory 'C:\jenkins\workspace\FDN.FIN5.Pavaso.UX2.0\test-sonar\PVS2' and will not be analyzed.
WARNING: File 'C:\jenkins\workspace\FDN.FIN5.Pavaso.UX2.0\test-sonar\packages\NUnitTestAdapter.2.3.0\build\Mono.Cecil.Pdb.dll' is not located under the root directory 'C:\jenkins\workspace\FDN.FIN5.Pavaso.UX2.0\test-sonar\PVS2' and will not be analyzed.
WARNING: File 'C:\jenkins\workspace\FDN.FIN5.Pavaso.UX2.0\test-sonar\packages\NUnitTestAdapter.2.3.0\build\Mono.Cecil.Rocks.dll' is not located under the root directory 'C:\jenkins\workspace\FDN.FIN5.Pavaso.UX2.0\test-sonar\PVS2' and will not be analyzed.
WARNING: File 'C:\jenkins\workspace\FDN.FIN5.Pavaso.UX2.0\test-sonar\packages\NUnitTestAdapter.2.3.0\build\nunit.core.dll' is not located under the root directory 'C:\jenkins\workspace\FDN.FIN5.Pavaso.UX2.0\test-sonar\PVS2' and will not be analyzed.
WARNING: File 'C:\jenkins\workspace\FDN.FIN5.Pavaso.UX2.0\test-sonar\packages\NUnitTestAdapter.2.3.0\build\nunit.core.interfaces.dll' is not located under the root directory 'C:\jenkins\workspace\FDN.FIN5.Pavaso.UX2.0\test-sonar\PVS2' and will not be analyzed.
WARNING: File 'C:\jenkins\workspace\FDN.FIN5.Pavaso.UX2.0\test-sonar\packages\NUnitTestAdapter.2.3.0\build\nunit.util.dll' is not located under the root directory 'C:\jenkins\workspace\FDN.FIN5.Pavaso.UX2.0\test-sonar\PVS2' and will not be analyzed.
WARNING: File 'C:\jenkins\workspace\FDN.FIN5.Pavaso.UX2.0\test-sonar\packages\MongoDB.Libmongocrypt.1.0.0\x64\native\windows\mongocrypt.dll' is not located under the root directory 'C:\jenkins\workspace\FDN.FIN5.Pavaso.UX2.0\test-sonar\PVS2' and will not be analyzed.
WARNING: File 'C:\jenkins\workspace\FDN.FIN5.Pavaso.UX2.0\test-sonar\packages\NUnit3TestAdapter.3.17.0\build\net35\NUnit3.TestAdapter.dll' is not located under the root directory 'C:\jenkins\workspace\FDN.FIN5.Pavaso.UX2.0\test-sonar\PVS2' and will not be analyzed.
WARNING: File 'C:\jenkins\workspace\FDN.FIN5.Pavaso.UX2.0\test-sonar\packages\NUnit3TestAdapter.3.17.0\build\net35\NUnit3.TestAdapter.pdb' is not located under the root directory 'C:\jenkins\workspace\FDN.FIN5.Pavaso.UX2.0\test-sonar\PVS2' and will not be analyzed.
WARNING: File 'C:\jenkins\workspace\FDN.FIN5.Pavaso.UX2.0\test-sonar\packages\NUnit3TestAdapter.3.17.0\build\net35\nunit.engine.dll' is not located under the root directory 'C:\jenkins\workspace\FDN.FIN5.Pavaso.UX2.0\test-sonar\PVS2' and will not be analyzed.
WARNING: File 'C:\jenkins\workspace\FDN.FIN5.Pavaso.UX2.0\test-sonar\packages\NUnit3TestAdapter.3.17.0\build\net35\nunit.engine.api.dll' is not located under the root directory 'C:\jenkins\workspace\FDN.FIN5.Pavaso.UX2.0\test-sonar\PVS2' and will not be analyzed.
WARNING: File 'C:\jenkins\workspace\FDN.FIN5.Pavaso.UX2.0\test-sonar\packages\NUnit3TestAdapter.3.17.0\build\net35\nunit.engine.core.dll' is not located under the root directory 'C:\jenkins\workspace\FDN.FIN5.Pavaso.UX2.0\test-sonar\PVS2' and will not be analyzed.
WARNING: File 'C:\jenkins\workspace\FDN.FIN5.Pavaso.UX2.0\test-sonar\packages\SpecFlow.NUnit.3.4.31\lib\net461\TechTalk.SpecFlow.NUnit.SpecFlowPlugin.dll' is not located under the root directory 'C:\jenkins\workspace\FDN.FIN5.Pavaso.UX2.0\test-sonar\PVS2' and will not be analyzed.
Calling the SonarQube Scanner...
INFO: Scanner configuration file: C:\DevOpsTools\sonar-scanner-msbuild-4.7.1.2311-net46\sonar-scanner-4.1.0.1829\bin\..\conf\sonar-scanner.properties
INFO: Project root configuration file: c:\jenkins\workspace\FDN.FIN5.Pavaso.UX2.0\test-sonar\.sonarqube\out\sonar-project.properties
INFO: SonarQube Scanner 4.1.0.1829
INFO: Java 1.8.0_221 Oracle Corporation (64-bit)
INFO: Windows 10 10.0 amd64
INFO: User cache: C:\Windows\system32\config\systemprofile\.sonar\cache
INFO: SonarQube server 7.9.0
INFO: Default locale: "en_US", source code encoding: "UTF-8"
WARN: SonarScanner will require Java 11+ to run starting in SonarQube 8.x
INFO: Load global settings
INFO: Load global settings (done) | time=263ms
INFO: Server id: BA476B94-AWyt_jL5rLLcuh6NsGOI
INFO: User cache: C:\Windows\system32\config\systemprofile\.sonar\cache
INFO: Load/download plugins
INFO: Load plugins index
INFO: Load plugins index (done) | time=100ms
INFO: Load/download plugins (done) | time=1255ms
WARN: Plugin SonarQube CNES Report [cnesreport] uses a child first classloader which is deprecated
INFO: Process project properties
INFO: Execute project builders
INFO: Execute project builders (done) | time=250ms
INFO: Project key: FDN.FIN5.PAVAUX2021.Automation_Sonar
INFO: Base dir: C:\Jenkins\workspace\FDN.FIN5.Pavaso.UX2.0\test-sonar\PVS2
INFO: Working dir: c:\jenkins\workspace\FDN.FIN5.Pavaso.UX2.0\test-sonar\.sonarqube\out\.sonar
INFO: Load project settings for component key: 'FDN.FIN5.PAVAUX2021.Automation_Sonar'
INFO: Load project settings for component key: 'FDN.FIN5.PAVAUX2021.Automation_Sonar' (done) | time=43ms
INFO: Load project branches
INFO: Load project branches (done) | time=33ms
INFO: Load project pull requests
INFO: Load project pull requests (done) | time=18ms
INFO: Load branch configuration
INFO: Load branch configuration (done) | time=2ms
INFO: Load quality profiles
INFO: Load quality profiles (done) | time=120ms
INFO: Detected Jenkins
INFO: Load active rules
INFO: Load active rules (done) | time=2859ms
INFO: Indexing files...
INFO: Project configuration:
INFO: Indexing files of module 'PVS2'
INFO: Base dir: C:\Jenkins\workspace\FDN.FIN5.Pavaso.UX2.0\test-sonar\PVS2
INFO: Test paths: Common/CommonAbstract.cs, Elements/MyCompanyInf.cs, Elements/No...
INFO: Load project repositories
INFO: Load project repositories (done) | time=40ms
INFO: Indexing files of module 'FDN.FIN5.PAVAUX2021.Automation_Sonar'
INFO: Base dir: C:\Jenkins\workspace\FDN.FIN5.Pavaso.UX2.0\test-sonar\PVS2
INFO: 54 files indexed
INFO: Quality profile for cs: Csharp-Standard
INFO: Quality profile for xml: Sonar way
INFO: ------------- Run sensors on module PVS2
INFO: Load metrics repository
INFO: Load metrics repository (done) | time=26ms
INFO: Sensor SonarCSS Rules [cssfamily]
INFO: No CSS, PHP, HTML or VueJS files are found in the project. CSS analysis is skipped.
INFO: Sensor SonarCSS Rules [cssfamily] (done) | time=3ms
INFO: Sensor C# Properties [csharp]
INFO: Sensor C# Properties [csharp] (done) | time=20ms
INFO: Sensor JavaXmlSensor [java]
INFO: 1 source files to be analyzed
INFO: Sensor JavaXmlSensor [java] (done) | time=319ms
INFO: Sensor XML Sensor [xml]
INFO: 1/1 source files have been analyzed
INFO: Sensor XML Sensor [xml] (done) | time=1ms
INFO: Sensor com.github.mc1arke.sonarqube.plugin.scanner.ScannerConfigurationLoaderSensor
INFO: Sensor com.github.mc1arke.sonarqube.plugin.scanner.ScannerConfigurationLoaderSensor (done) | time=2ms
INFO: Sensor JaCoCo XML Report Importer [jacoco]
INFO: Sensor JaCoCo XML Report Importer [jacoco] (done) | time=3ms
INFO: ------------- Run sensors on module FDN.FIN5.PAVAUX2021.Automation_Sonar
INFO: Sensor SonarCSS Rules [cssfamily]
INFO: No CSS, PHP, HTML or VueJS files are found in the project. CSS analysis is skipped.
INFO: Sensor SonarCSS Rules [cssfamily] (done) | time=1ms
INFO: Sensor JavaXmlSensor [java]
INFO: Sensor JavaXmlSensor [java] (done) | time=0ms
INFO: Sensor com.github.mc1arke.sonarqube.plugin.scanner.ScannerConfigurationLoaderSensor
INFO: Sensor com.github.mc1arke.sonarqube.plugin.scanner.ScannerConfigurationLoaderSensor (done) | time=1ms
INFO: Sensor JaCoCo XML Report Importer [jacoco]
INFO: Sensor JaCoCo XML Report Importer [jacoco] (done) | time=1ms
INFO: Sensor C# [csharp]
INFO: Sensor C# [csharp] (done) | time=0ms
INFO: Sensor Apex CPD [codescan]
INFO: Sensor Apex CPD [codescan] (done) | time=23ms
INFO: Sensor VisualForce/Lightning CPD [codescan]
INFO: Sensor VisualForce/Lightning CPD [codescan] (done) | time=1ms
INFO: ------------- Run sensors on project
INFO: Sensor Zero Coverage Sensor
INFO: Sensor Zero Coverage Sensor (done) | time=0ms
INFO: SCM Publisher is disabled
INFO: Calculating CPD for 0 files
INFO: CPD calculation finished
INFO: Analysis report generated in 269ms, dir size=494 KB
INFO: Analysis report compressed in 172ms, zip size=95 KB
INFO: Analysis report uploaded in 104ms
INFO: ANALYSIS SUCCESSFUL, you can browse https:/******.com.vn/dashboard?id=*****
INFO: Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report
INFO: More about the report processing at https://sonar-dn.fsoft.com.vn/api/ce/task?id=******
INFO: Executing post-job 'Final report'
INFO: Turn debug info on to get more details (sonar-scanner -X -Dsonar.verbose=true ...).
INFO: Executing post-job 'Final report'
INFO: Turn debug info on to get more details (sonar-scanner -X -Dsonar.verbose=true ...).
INFO: Analysis total time: 15.353 s
INFO: ------------------------------------------------------------------------
INFO: EXECUTION SUCCESS
INFO: ------------------------------------------------------------------------
INFO: Total time: 20.567s
INFO: Final Memory: 22M/233M
INFO: ------------------------------------------------------------------------
The SonarQube Scanner has finished
14:59:32.08 Post-processing succeeded.
this is what i get
Hi @D_c_Tu_n_Mai ! Could you please provide:
- the logs for the end step with the full verbosity on? (add /d:sonar.verbose=true to the start step of the scanner)
- Full log of msbuild step of your project
Thank you in advance!