I am not having success with scanner for .net framework:
Just to clarify, I am trying to analyze a project with target framework.“net framework 4.8.”
If I use the sonarScanner.msbuild.exe with verbose the output show that, calling CLI and exited with code 0 but do not happen anything.
PS D:\DevLibTest\ClassLibraryTest> SonarScanner.MSBuild.exe begin /k:"qqq" /d:sonar.verbose=true /d:sonar.host.url="http://localhost:9000" /d:sonar.token="sqp_19187a667d4275712ed5f89d061a9409419c97db"
SonarScanner for MSBuild 5.13.1
Using the .NET Framework version of the Scanner for MSBuild
Default properties file was found at D:\dev\TestSonarQube\scanner\SonarQube.Analysis.xml
Loading analysis properties from D:\dev\TestSonarQube\scanner\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...
20:27:52.763 20:27:52.754 Loading analysis properties from D:\dev\TestSonarQube\scanner\SonarQube.Analysis.xml
20:27:52.764 20:27:52.763 sonar.verbose=true was specified - setting the log verbosity to 'Debug'
20:27:52.767 Updating build integration targets...
20:27:52.77 The file SonarQube.Integration.ImportBefore.targets is up to date at C:\Users\fauly.coelho\AppData\Local\Microsoft\MSBuild\4.0\Microsoft.Common.targets\ImportBefore
20:27:52.77 The file SonarQube.Integration.ImportBefore.targets is up to date at C:\Users\fauly.coelho\AppData\Local\Microsoft\MSBuild\10.0\Microsoft.Common.targets\ImportBefore
20:27:52.77 The file SonarQube.Integration.ImportBefore.targets is up to date at C:\Users\fauly.coelho\AppData\Local\Microsoft\MSBuild\11.0\Microsoft.Common.targets\ImportBefore
20:27:52.771 The file SonarQube.Integration.ImportBefore.targets is up to date at C:\Users\fauly.coelho\AppData\Local\Microsoft\MSBuild\12.0\Microsoft.Common.targets\ImportBefore
20:27:52.771 The file SonarQube.Integration.ImportBefore.targets is up to date at C:\Users\fauly.coelho\AppData\Local\Microsoft\MSBuild\14.0\Microsoft.Common.targets\ImportBefore
20:27:52.771 The file SonarQube.Integration.ImportBefore.targets is up to date at C:\Users\fauly.coelho\AppData\Local\Microsoft\MSBuild\15.0\Microsoft.Common.targets\ImportBefore
20:27:52.772 The file SonarQube.Integration.ImportBefore.targets is up to date at C:\Users\fauly.coelho\AppData\Local\Microsoft\MSBuild\Current\Microsoft.Common.targets\ImportBefore
20:27:52.773 Installed SonarQube.Integration.targets to D:\DevLibTest\ClassLibraryTest\.sonarqube\bin\targets
20:27:52.776 Creating config and output folders...
20:27:52.777 Creating directory: D:\DevLibTest\ClassLibraryTest\.sonarqube\conf
20:27:52.778 Creating directory: D:\DevLibTest\ClassLibraryTest\.sonarqube\out
20:27:52.795 Fetching server version...
20:27:52.798 Downloading from http://localhost:9000/api/server/version...
20:27:52.822 Response received from http://localhost:9000/api/server/version...
20:27:52.828 Checking validity of server license
20:27:52.829 Downloading from http://localhost:9000/api/editions/is_valid_license...
20:27:52.835 Response received from http://localhost:9000/api/editions/is_valid_license...
20:27:52.836 SonarQube Community Edition detected, license is valid.
20:27:52.84 Fetching analysis configuration settings...
20:27:52.844 Fetching properties for project 'qqq'...
20:27:52.845 Downloading from http://localhost:9000/api/settings/values?component=qqq...
20:27:52.857 Response received from http://localhost:9000/api/settings/values?component=qqq...
20:27:52.861 Downloading from http://localhost:9000/api/languages/list...
20:27:52.865 Response received from http://localhost:9000/api/languages/list...
20:27:52.868 Fetching quality profile for project 'qqq'...
20:27:52.87 Downloading from http://localhost:9000/api/qualityprofiles/search?project=qqq...
20:27:52.888 Response received from http://localhost:9000/api/qualityprofiles/search?project=qqq...
20:27:52.891 Fetching rules for quality profile 'AYpBthQ7laLmDHN4FaZo'...
20:27:52.893 Downloading from http://localhost:9000/api/rules/search?f=repo,name,severity,lang,internalKey,templateKey,params,actives&ps=500&qprofile=AYpBthQ7laLmDHN4FaZo&p=1...
20:27:53.01 Response received from http://localhost:9000/api/rules/search?f=repo,name,severity,lang,internalKey,templateKey,params,actives&ps=500&qprofile=AYpBthQ7laLmDHN4FaZo&p=1...
20:27:53.023 Local analyzer cache: C:\Users\fauly.coelho\AppData\Local\Temp\.sonarqube\resources
20:27:53.031 Writing Roslyn generated ruleset to D:\DevLibTest\ClassLibraryTest\.sonarqube\conf\Sonar-cs.ruleset...
20:27:53.044 Writing Roslyn generated ruleset to D:\DevLibTest\ClassLibraryTest\.sonarqube\conf\Sonar-cs-none.ruleset...
20:27:53.053 Provisioning analyzer assemblies for cs...
20:27:53.054 Installing required Roslyn analyzers...
20:27:53.055 Processing plugin: csharp version 8.51.0.59060
20:27:53.066 Cache hit: using plugin files from C:\Users\fauly.coelho\AppData\Local\Temp\.sonarqube\resources\2
20:27:53.067 Processing plugin: vbnet version 8.51.0.59060
20:27:53.068 Cache hit: using plugin files from C:\Users\fauly.coelho\AppData\Local\Temp\.sonarqube\resources\3
20:27:53.073 Writing Roslyn analyzer additional file to D:\DevLibTest\ClassLibraryTest\.sonarqube\conf\cs\SonarLint.xml...
20:27:53.075 Fetching quality profile for project 'qqq'...
20:27:53.079 Downloading from http://localhost:9000/api/qualityprofiles/search?project=qqq...
20:27:53.095 Response received from http://localhost:9000/api/qualityprofiles/search?project=qqq...
20:27:53.098 Fetching rules for quality profile 'AYpBthpilaLmDHN4FbJE'...
20:27:53.099 Downloading from http://localhost:9000/api/rules/search?f=repo,name,severity,lang,internalKey,templateKey,params,actives&ps=500&qprofile=AYpBthpilaLmDHN4FbJE&p=1...
20:27:53.161 Response received from http://localhost:9000/api/rules/search?f=repo,name,severity,lang,internalKey,templateKey,params,actives&ps=500&qprofile=AYpBthpilaLmDHN4FbJE&p=1...
20:27:53.165 Local analyzer cache: C:\Users\fauly.coelho\AppData\Local\Temp\.sonarqube\resources
20:27:53.167 Writing Roslyn generated ruleset to D:\DevLibTest\ClassLibraryTest\.sonarqube\conf\Sonar-vbnet.ruleset...
20:27:53.168 Writing Roslyn generated ruleset to D:\DevLibTest\ClassLibraryTest\.sonarqube\conf\Sonar-vbnet-none.ruleset...
20:27:53.17 Provisioning analyzer assemblies for vbnet...
20:27:53.17 Installing required Roslyn analyzers...
20:27:53.17 Processing plugin: csharp version 8.51.0.59060
20:27:53.171 Cache hit: using plugin files from C:\Users\fauly.coelho\AppData\Local\Temp\.sonarqube\resources\2
20:27:53.172 Processing plugin: vbnet version 8.51.0.59060
20:27:53.173 Cache hit: using plugin files from C:\Users\fauly.coelho\AppData\Local\Temp\.sonarqube\resources\3
20:27:53.176 Writing Roslyn analyzer additional file to D:\DevLibTest\ClassLibraryTest\.sonarqube\conf\vbnet\SonarLint.xml...
20:27:53.179 Processing analysis cache
20:27:53.183 Incremental PR analysis: Base branch parameter was not provided.
20:27:53.186 Cache data is empty. A full analysis will be performed.
20:27:53.208 Pre-processing succeeded.
PS D:\DevLibTest\ClassLibraryTest> msbuild.exe /t:Rebuild
Microsoft(R) Build Engine versão 15.9.21+g9802d43bc3 para .NET Framework
Copyright (C) Microsoft Corporation. Todos os direitos reservados.
Compilando os projetos desta solução um de cada vez. Para habilitar o build paralelo, adicione a opção "/m".
Compilação de 29/08/2023 20:28:10 iniciada.
Projeto "D:\DevLibTest\ClassLibraryTest\ClassLibraryTest.sln" no nó 1 (Rebuild destino(s)).
ValidateSolutionConfiguration:
Compilando a configuração de solução "Debug|Any CPU".
O projeto "D:\DevLibTest\ClassLibraryTest\ClassLibraryTest.sln" (1) está compilando "D:\DevLibTest\ClassLibraryTest\Cla
ssLibraryTest\ClassLibraryTest.csproj" (2) no nó 1 (Rebuild destino(s)).
CoreClean:
Excluindo o arquivo "d:\DevLibTest\ClassLibraryTest\ClassLibraryTest\bin\Debug\ClassLibraryTest.dll".
Excluindo o arquivo "d:\DevLibTest\ClassLibraryTest\ClassLibraryTest\bin\Debug\ClassLibraryTest.pdb".
Excluindo o arquivo "d:\DevLibTest\ClassLibraryTest\ClassLibraryTest\obj\Debug\ClassLibraryTest.csproj.CoreCompileInp
uts.cache".
Excluindo o arquivo "d:\DevLibTest\ClassLibraryTest\ClassLibraryTest\obj\Debug\ClassLibraryTest.dll".
Excluindo o arquivo "d:\DevLibTest\ClassLibraryTest\ClassLibraryTest\obj\Debug\ClassLibraryTest.pdb".
Excluindo o arquivo "D:\DevLibTest\ClassLibraryTest\ClassLibraryTest\obj\Debug\ClassLibraryTest.csproj.AssemblyRefere
nce.cache".
GenerateTargetFrameworkMonikerAttribute:
Ignorando o destino "GenerateTargetFrameworkMonikerAttribute" porque todos os arquivos de saída estão atualizados em re
lação aos arquivos de entrada.
SonarCategoriseProject:
Sonar: (ClassLibraryTest.csproj) Categorizing project as test or product code...
Sonar: (ClassLibraryTest.csproj) categorized as MAIN project (production code).
SonarCreateProjectSpecificDirs:
Criando o diretório "D:\DevLibTest\ClassLibraryTest\.sonarqube\conf\0".
SonarWriteFilesToAnalyze:
Sonar: (ClassLibraryTest.csproj) Number of files to analyse: 2. The list of files to be analyzed is in D:\DevLibTest\
ClassLibraryTest\.sonarqube\conf\0\FilesToAnalyze.txt.
SetRoslynCodeAnalysisProperties:
Sonar: (ClassLibraryTest.csproj) Analysis configured successfully with D:\DevLibTest\ClassLibraryTest\.sonarqube\conf
\0\SonarProjectConfig.xml.
SonarQubeImportBeforeInfo:
Sonar: (ClassLibraryTest) SonarQube.Integration.ImportBefore.targets was loaded
CoreCompile:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\Roslyn\csc.exe /noconfig /nowarn:17
01,1702 /nostdlib+ /errorreport:prompt /warn:4 /define:DEBUG;TRACE /highentropyva+ /reference:"C:\Program Files (x86)
\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8\Microsoft.CSharp.dll" /reference:"C:\Program Files (x86)
\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8\mscorlib.dll" /reference:"C:\Program Files (x86)\Referen
ce Assemblies\Microsoft\Framework\.NETFramework\v4.8\System.Core.dll" /reference:"C:\Program Files (x86)\Reference As
semblies\Microsoft\Framework\.NETFramework\v4.8\System.Data.DataSetExtensions.dll" /reference:"C:\Program Files (x86)
\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8\System.Data.dll" /reference:"C:\Program Files (x86)\Refe
rence Assemblies\Microsoft\Framework\.NETFramework\v4.8\System.dll" /reference:"C:\Program Files (x86)\Reference Asse
mblies\Microsoft\Framework\.NETFramework\v4.8\System.Net.Http.dll" /reference:"C:\Program Files (x86)\Reference Assem
blies\Microsoft\Framework\.NETFramework\v4.8\System.Xml.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\
Microsoft\Framework\.NETFramework\v4.8\System.Xml.Linq.dll" /debug+ /debug:full /filealign:512 /optimize- /out:obj\De
bug\ClassLibraryTest.dll /ruleset:D:\DevLibTest\ClassLibraryTest\.sonarqube\conf\0\merged.ruleset /errorlog:D:\DevLib
Test\ClassLibraryTest\.sonarqube\out\0\Issues.json /subsystemversion:6.00 /target:library /warnaserror- /utf8output /
deterministic+ /analyzer:C:\Users\fauly.coelho\AppData\Local\Temp\.sonarqube\resources\2\Google.Protobuf.dll /analyze
r:C:\Users\fauly.coelho\AppData\Local\Temp\.sonarqube\resources\2\SonarAnalyzer.CFG.dll /analyzer:C:\Users\fauly.coel
ho\AppData\Local\Temp\.sonarqube\resources\2\SonarAnalyzer.CSharp.dll /analyzer:C:\Users\fauly.coelho\AppData\Local\T
emp\.sonarqube\resources\2\SonarAnalyzer.dll /analyzer:C:\Users\fauly.coelho\AppData\Local\Temp\.sonarqube\resources\
3\Google.Protobuf.dll /analyzer:C:\Users\fauly.coelho\AppData\Local\Temp\.sonarqube\resources\3\SonarAnalyzer.CFG.dll
/analyzer:C:\Users\fauly.coelho\AppData\Local\Temp\.sonarqube\resources\3\SonarAnalyzer.dll /analyzer:C:\Users\fauly
.coelho\AppData\Local\Temp\.sonarqube\resources\3\SonarAnalyzer.VisualBasic.dll /additionalfile:D:\DevLibTest\ClassLi
braryTest\.sonarqube\conf\cs\SonarLint.xml /additionalfile:D:\DevLibTest\ClassLibraryTest\.sonarqube\conf\0\SonarProj
ectConfig.xml /additionalfile:D:\DevLibTest\ClassLibraryTest\.sonarqube\conf\0\ProjectOutFolderPath.txt Class1.cs Pro
perties\AssemblyInfo.cs "C:\Users\fauly.coelho\AppData\Local\Temp\.NETFramework,Version=v4.8.AssemblyAttributes.cs"
Using shared compilation with compiler from directory: C:\Program Files (x86)\Microsoft Visual Studio\2017\Profession
al\MSBuild\15.0\Bin\Roslyn
Class1.cs(22,29): warning CS0618: 'Class1.TestObsolet()' is obsolete: 'Do not use it' [D:\DevLibTest\ClassLibraryTest\C
lassLibraryTest\ClassLibraryTest.csproj]
Class1.cs(30,29): warning CS0618: 'Class1.TestObsolet()' is obsolete: 'Do not use it' [D:\DevLibTest\ClassLibraryTest\C
lassLibraryTest\ClassLibraryTest.csproj]
Class1.cs(40,13): warning CS0618: 'Class1.TestObsolet()' is obsolete: 'Do not use it' [D:\DevLibTest\ClassLibraryTest\C
lassLibraryTest\ClassLibraryTest.csproj]
Class1.cs(41,13): warning CS0618: 'Class1.TestObsolet()' is obsolete: 'Do not use it' [D:\DevLibTest\ClassLibraryTest\C
lassLibraryTest\ClassLibraryTest.csproj]
Class1.cs(42,13): warning CS0618: 'Class1.TestObsolet()' is obsolete: 'Do not use it' [D:\DevLibTest\ClassLibraryTest\C
lassLibraryTest\ClassLibraryTest.csproj]
Class1.cs(34,34): warning CS0168: The variable 'ex' is declared but never used [D:\DevLibTest\ClassLibraryTest\ClassLib
raryTest\ClassLibraryTest.csproj]
Class1.cs(13,20): warning CS0168: The variable 'teste' is declared but never used [D:\DevLibTest\ClassLibraryTest\Class
LibraryTest\ClassLibraryTest.csproj]
Class1.cs(51,22): warning S1186: Add a nested comment explaining why this method is empty, throw a 'NotSupportedExcepti
on' or complete the implementation. [D:\DevLibTest\ClassLibraryTest\ClassLibraryTest\ClassLibraryTest.csproj]
Class1.cs(47,21): warning S1186: Add a nested comment explaining why this method is empty, throw a 'NotSupportedExcepti
on' or complete the implementation. [D:\DevLibTest\ClassLibraryTest\ClassLibraryTest\ClassLibraryTest.csproj]
Class1.cs(34,17): warning S2737: Add logic to this catch clause or eliminate it and rethrow the exception automatically
. [D:\DevLibTest\ClassLibraryTest\ClassLibraryTest\ClassLibraryTest.csproj]
Class1.cs(24,25): warning S4524: Move this 'default:' case to the beginning or end of this 'switch' statement. [D:\DevL
ibTest\ClassLibraryTest\ClassLibraryTest\ClassLibraryTest.csproj]
Class1.cs(13,20): warning S1481: Remove the unused local variable 'teste'. [D:\DevLibTest\ClassLibraryTest\ClassLibrary
Test\ClassLibraryTest.csproj]
CopyFilesToOutputDirectory:
Copiando o arquivo de "obj\Debug\ClassLibraryTest.dll" para "bin\Debug\ClassLibraryTest.dll".
ClassLibraryTest -> D:\DevLibTest\ClassLibraryTest\ClassLibraryTest\bin\Debug\ClassLibraryTest.dll
Copiando o arquivo de "obj\Debug\ClassLibraryTest.pdb" para "bin\Debug\ClassLibraryTest.pdb".
SonarWriteProjectData:
Sonar: (ClassLibraryTest.csproj) Project processed successfully
Projeto de compilação pronto "D:\DevLibTest\ClassLibraryTest\ClassLibraryTest\ClassLibraryTest.csproj" (Rebuild destino
(s)).
Projeto de compilação pronto "D:\DevLibTest\ClassLibraryTest\ClassLibraryTest.sln" (Rebuild destino(s)).
Compilação com êxito.
"D:\DevLibTest\ClassLibraryTest\ClassLibraryTest.sln" (Rebuild destino) (1) ->
"D:\DevLibTest\ClassLibraryTest\ClassLibraryTest\ClassLibraryTest.csproj" (Rebuild destino) (2) ->
(CoreCompile destino) ->
Class1.cs(22,29): warning CS0618: 'Class1.TestObsolet()' is obsolete: 'Do not use it' [D:\DevLibTest\ClassLibraryTest
\ClassLibraryTest\ClassLibraryTest.csproj]
Class1.cs(30,29): warning CS0618: 'Class1.TestObsolet()' is obsolete: 'Do not use it' [D:\DevLibTest\ClassLibraryTest
\ClassLibraryTest\ClassLibraryTest.csproj]
Class1.cs(40,13): warning CS0618: 'Class1.TestObsolet()' is obsolete: 'Do not use it' [D:\DevLibTest\ClassLibraryTest
\ClassLibraryTest\ClassLibraryTest.csproj]
Class1.cs(41,13): warning CS0618: 'Class1.TestObsolet()' is obsolete: 'Do not use it' [D:\DevLibTest\ClassLibraryTest
\ClassLibraryTest\ClassLibraryTest.csproj]
Class1.cs(42,13): warning CS0618: 'Class1.TestObsolet()' is obsolete: 'Do not use it' [D:\DevLibTest\ClassLibraryTest
\ClassLibraryTest\ClassLibraryTest.csproj]
Class1.cs(34,34): warning CS0168: The variable 'ex' is declared but never used [D:\DevLibTest\ClassLibraryTest\ClassL
ibraryTest\ClassLibraryTest.csproj]
Class1.cs(13,20): warning CS0168: The variable 'teste' is declared but never used [D:\DevLibTest\ClassLibraryTest\Cla
ssLibraryTest\ClassLibraryTest.csproj]
Class1.cs(51,22): warning S1186: Add a nested comment explaining why this method is empty, throw a 'NotSupportedExcep
tion' or complete the implementation. [D:\DevLibTest\ClassLibraryTest\ClassLibraryTest\ClassLibraryTest.csproj]
Class1.cs(47,21): warning S1186: Add a nested comment explaining why this method is empty, throw a 'NotSupportedExcep
tion' or complete the implementation. [D:\DevLibTest\ClassLibraryTest\ClassLibraryTest\ClassLibraryTest.csproj]
Class1.cs(34,17): warning S2737: Add logic to this catch clause or eliminate it and rethrow the exception automatical
ly. [D:\DevLibTest\ClassLibraryTest\ClassLibraryTest\ClassLibraryTest.csproj]
Class1.cs(24,25): warning S4524: Move this 'default:' case to the beginning or end of this 'switch' statement. [D:\De
vLibTest\ClassLibraryTest\ClassLibraryTest\ClassLibraryTest.csproj]
Class1.cs(13,20): warning S1481: Remove the unused local variable 'teste'. [D:\DevLibTest\ClassLibraryTest\ClassLibra
ryTest\ClassLibraryTest.csproj]
12 Aviso(s)
0 Erro(s)
Tempo Decorrido 00:00:04.91
PS D:\DevLibTest\ClassLibraryTest> SonarScanner.MSBuild.exe end /d:sonar.token="sqp_19187a667d4275712ed5f89d061a9409419c97db"
SonarScanner for MSBuild 5.13.1
Using the .NET Framework version of the Scanner for MSBuild
Post-processing started.
20:28:19.131 20:28:19.127 Uninstalling target: D:\DevLibTest\ClassLibraryTest\.sonarqube\bin\targets\SonarQube.Integration.targets
20:28:19.133 20:28:19.131 sonar.verbose=true was specified - setting the log verbosity to 'Debug'
20:28:19.138 Loading the SonarQube analysis config from D:\DevLibTest\ClassLibraryTest\.sonarqube\conf\SonarQubeAnalysisConfig.xml
20:28:19.14 Not running under TeamBuild
20:28:19.141 Analysis base directory: D:\DevLibTest\ClassLibraryTest\.sonarqube
Build directory:
Bin directory: D:\DevLibTest\ClassLibraryTest\.sonarqube\bin
Config directory: D:\DevLibTest\ClassLibraryTest\.sonarqube\conf
Output directory: D:\DevLibTest\ClassLibraryTest\.sonarqube\out
Config file: D:\DevLibTest\ClassLibraryTest\.sonarqube\conf\SonarQubeAnalysisConfig.xml
20:28:19.148 Generating SonarQube project properties file to D:\DevLibTest\ClassLibraryTest\.sonarqube\out\sonar-project.properties
20:28:19.168 Setting analysis property: sonar.visualstudio.enable=false
20:28:19.178 The supplied Code Analysis ErrorLog file is a valid json file and does not need to be fixed: D:\DevLibTest\ClassLibraryTest\.sonarqube\out\0\Issues.json
20:28:19.192 Using longest common projects path as a base directory: 'D:\DevLibTest\ClassLibraryTest\ClassLibraryTest'.
20:28:19.206 Dumping content of sonar-project.properties
------------------------------------------------------------------------
sonar.projectKey=qqq
sonar.working.directory=D:\\DevLibTest\\ClassLibraryTest\\.sonarqube\\out\\.sonar
sonar.projectBaseDir=D:\\DevLibTest\\ClassLibraryTest\\ClassLibraryTest
sonar.pullrequest.cache.basepath=D:\\DevLibTest\\ClassLibraryTest
1ECA1CEF-EBB3-4245-ADA3-499688730D62.sonar.projectKey=qqq:1ECA1CEF-EBB3-4245-ADA3-499688730D62
1ECA1CEF-EBB3-4245-ADA3-499688730D62.sonar.projectName=ClassLibraryTest
1ECA1CEF-EBB3-4245-ADA3-499688730D62.sonar.projectBaseDir=D:\\DevLibTest\\ClassLibraryTest\\ClassLibraryTest
1ECA1CEF-EBB3-4245-ADA3-499688730D62.sonar.sourceEncoding=utf-8
1ECA1CEF-EBB3-4245-ADA3-499688730D62.sonar.sources=\
"D:\\DevLibTest\\ClassLibraryTest\\ClassLibraryTest\\Class1.cs",\
"D:\\DevLibTest\\ClassLibraryTest\\ClassLibraryTest\\Properties\\AssemblyInfo.cs"
1ECA1CEF-EBB3-4245-ADA3-499688730D62.sonar.cs.analyzer.projectOutPaths=\
"D:\\DevLibTest\\ClassLibraryTest\\.sonarqube\\out\\0"
1ECA1CEF-EBB3-4245-ADA3-499688730D62.sonar.cs.roslyn.reportFilePaths=\
"D:\\DevLibTest\\ClassLibraryTest\\.sonarqube\\out\\0\\Issues.json"
1ECA1CEF-EBB3-4245-ADA3-499688730D62.sonar.working.directory=D:\\DevLibTest\\ClassLibraryTest\\.sonarqube\\out\\.sonar\\mod0
sonar.host.url=http://localhost:9000
sonar.visualstudio.enable=false
sonar.modules=1ECA1CEF-EBB3-4245-ADA3-499688730D62
------------------------------------------------------------------------
20:28:19.221 Writing processing summary to D:\DevLibTest\ClassLibraryTest\.sonarqube\out\ProjectInfo.log
Calling the TFS Processor executable...
Executing file D:\dev\TestSonarQube\scanner\SonarScanner.MSBuild.TFSProcessor.exe
Args: ConvertCoverage D:\DevLibTest\ClassLibraryTest\.sonarqube\conf\SonarQubeAnalysisConfig.xml D:\DevLibTest\ClassLibraryTest\.sonarqube\out\sonar-project.properties
Working directory: D:\DevLibTest\ClassLibraryTest
Timeout (ms):-1
Process id: 26664
Process returned exit code 0
The TFS Processor has finished
Calling the SonarScanner CLI...
Executing file D:\dev\TestSonarQube\scanner\sonar-scanner-4.8.1.3023\bin\sonar-scanner.bat
Args: -Dsonar.scanAllFiles=true -Dproject.settings=D:\DevLibTest\ClassLibraryTest\.sonarqube\out\sonar-project.properties --from=ScannerMSBuild/5.13.1 --debug <sensitive data removed>
Working directory: D:\DevLibTest\ClassLibraryTest
Timeout (ms):-1
Process id: 29436
Process returned exit code 0
The SonarScanner CLI has finished
20:28:19.677 Post-processing succeeded.
So, I tried to run the sonar-scanner.bat directly and I can see the dashboard but without any code smell (It was supposed to show because I put some code smell there):
sonar-scanner.bat -D"sonar.projectKey=" -D"sonar.sources=." -D"sonar.host.url=http://localhost:9000" -D"sonar.login="
And now the displayed message was: " WARN: Your project contains C# files which cannot be analyzed with the scanner you are using. To analyze C# or VB.NET, you must use the SonarScanner for .NET 5.x or higher, see SonarScanner for .NET "
PS D:\DevLibTest\ClassLibraryTest> sonar-scanner.bat -D"sonar.projectKey=qqq" -D"sonar.sources=." -D"sonar.host.url=http://localhost:9000" -D"sonar.login=sqp_19187a667d4275712ed5f89d061a9409419c97db"
INFO: Scanner configuration file: D:\dev\TestSonarQube\scanner-cli\bin..\conf\sonar-scanner.properties
INFO: Project root configuration file: NONE
INFO: SonarScanner 5.0.1.3006
INFO: Java 17.0.7 Eclipse Adoptium (64-bit)
INFO: Windows 10 10.0 amd64
INFO: User cache: C:\Users\fauly.coelho.sonar\cache
INFO: Analyzing on SonarQube server 9.9.1.69595
INFO: Default locale: “pt_BR”, source code encoding: “windows-1252” (analysis is platform dependent)
INFO: Load global settings
INFO: Load global settings (done) | time=59ms
INFO: Server id: 147B411E-AYpBtTVilaLmDHN4FRdY
INFO: User cache: C:\Users\fauly.coelho.sonar\cache
INFO: Load/download plugins
INFO: Load plugins index
INFO: Load plugins index (done) | time=40ms
INFO: Load/download plugins (done) | time=118ms
INFO: Process project properties
INFO: Process project properties (done) | time=0ms
INFO: Execute project builders
INFO: Execute project builders (done) | time=0ms
INFO: Project key: qqq
INFO: Base dir: D:\DevLibTest\ClassLibraryTest
INFO: Working dir: D:\DevLibTest\ClassLibraryTest.scannerwork
INFO: Load project settings for component key: ‘qqq’
INFO: Load project settings for component key: ‘qqq’ (done) | time=26ms
INFO: Load quality profiles
INFO: Load quality profiles (done) | time=38ms
INFO: Load active rules
INFO: Load active rules (done) | time=1091ms
INFO: Load analysis cache
INFO: Load analysis cache (404) | time=12ms
INFO: Load project repositories
INFO: Load project repositories (done) | time=25ms
INFO: Indexing files…
INFO: Project configuration:
INFO: 40 files indexed
INFO: Quality profile for cs: Sonar way
INFO: Quality profile for json: Sonar way
INFO: Quality profile for xml: Sonar way
INFO: ------------- Run sensors on module qqq
INFO: Load metrics repository
INFO: Load metrics repository (done) | time=26ms
INFO: Sensor JaCoCo XML Report Importer [jacoco]
INFO: ‘sonar.coverage.jacoco.xmlReportPaths’ is not defined. Using default locations: target/site/jacoco/jacoco.xml,target/site/jacoco-it/jacoco.xml,build/reports/jacoco/test/jacocoTestReport.xml
INFO: No report imported, no coverage information will be imported by JaCoCo XML Report Importer
INFO: Sensor JaCoCo XML Report Importer [jacoco] (done) | time=16ms
INFO: Sensor IaC CloudFormation Sensor [iac]
INFO: 0 source files to be analyzed
INFO: 0/0 source files have been analyzed
INFO: Sensor IaC CloudFormation Sensor [iac] (done) | time=53ms
INFO: Sensor IaC Kubernetes Sensor [iac]
INFO: 0 source files to be analyzed
INFO: 0/0 source files have been analyzed
INFO: Sensor IaC Kubernetes Sensor [iac] (done) | time=0ms
INFO: Sensor CSS Rules [javascript]
INFO: No CSS, PHP, HTML or VueJS files are found in the project. CSS analysis is skipped.
INFO: Sensor CSS Rules [javascript] (done) | time=0ms
INFO: Sensor C# Project Type Information [csharp]
INFO: Sensor C# Project Type Information [csharp] (done) | time=0ms
INFO: Sensor C# Analysis Log [csharp]
INFO: Sensor C# Analysis Log [csharp] (done) | time=15ms
INFO: Sensor C# Properties [csharp]
INFO: Sensor C# Properties [csharp] (done) | time=0ms
INFO: Sensor HTML [web]
INFO: Sensor HTML [web] (done) | time=16ms
INFO: Sensor XML Sensor [xml]
INFO: 5 source files to be analyzed
INFO: 5/5 source files have been analyzed
INFO: Sensor XML Sensor [xml] (done) | time=313ms
INFO: Sensor TextAndSecretsSensor [text]
INFO: 12 source files to be analyzed
INFO: 12/12 source files have been analyzed
INFO: Sensor TextAndSecretsSensor [text] (done) | time=72ms
INFO: Sensor VB.NET Project Type Information [vbnet]
INFO: Sensor VB.NET Project Type Information [vbnet] (done) | time=0ms
INFO: Sensor VB.NET Analysis Log [vbnet]
INFO: Sensor VB.NET Analysis Log [vbnet] (done) | time=16ms
INFO: Sensor VB.NET Properties [vbnet]
INFO: Sensor VB.NET Properties [vbnet] (done) | time=0ms
INFO: Sensor IaC Docker Sensor [iac]
INFO: 0 source files to be analyzed
INFO: 0/0 source files have been analyzed
INFO: Sensor IaC Docker Sensor [iac] (done) | time=47ms
INFO: ------------- Run sensors on project
INFO: Sensor C# [csharp]
WARN: Your project contains C# files which cannot be analyzed with the scanner you are using. To analyze C# or VB.NET, you must use the SonarScanner for .NET 5.x or higher, see SonarScanner for .NET
INFO: Sensor C# [csharp] (done) | time=0ms
INFO: Sensor Analysis Warnings import [csharp]
INFO: Sensor Analysis Warnings import [csharp] (done) | time=0ms
INFO: Sensor C# File Caching Sensor [csharp]
WARN: Incremental PR analysis: Could not determine common base path, cache will not be computed. Consider setting ‘sonar.projectBaseDir’ property.
INFO: Sensor C# File Caching Sensor [csharp] (done) | time=0ms
INFO: Sensor Zero Coverage Sensor
INFO: Sensor Zero Coverage Sensor (done) | time=15ms
INFO: SCM Publisher is disabled
INFO: CPD Executor Calculating CPD for 0 files
INFO: CPD Executor CPD calculation finished (done) | time=0ms
INFO: Analysis report generated in 109ms, dir size=222.7 kB
INFO: Analysis report compressed in 59ms, zip size=43.0 kB
INFO: Analysis report uploaded in 22ms
INFO: ANALYSIS SUCCESSFUL, you can find the results at: http://localhost:9000/dashboard?id=qqq
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 http://localhost:9000/api/ce/task?id=AYpDgxtLNTK5s9pArzzg
INFO: Analysis total time: 4.278 s
INFO: ------------------------------------------------------------------------
INFO: EXECUTION SUCCESS
INFO: ------------------------------------------------------------------------
INFO: Total time: 5.417s
INFO: Final Memory: 16M/60M
INFO: ------------------------------------------------------------------------