The SonarScanner for MSBuild integration failed: SonarQube was unable to collect the required information about your projects

Hey @vishnu_G, are you getting this issue while building in a CI pipeline somewhere or locally on your machine?

I had this issue with a self-hosted agent pool in Azure DevOps where a single VM would run multiple builds in parallel. There’s an issue where the sonar scanner is installed globally to the machine and that scanner gets removed after code analysis is completed. This obviously creates a race condition when running multiple scans in parallel.

Could be related to Make Azure DevOps build tasks atomic to the agent

1 Like

Hi Simon,

It seems my current situation matches with your inputs.
I am working on the single pipeline by creating self hosted agent in the single vm where sonarqube is hosted.
when i set the environment variables and sonar-scanner.properties with reference to code path like .sln,i am facing the issue of MSbuild(solution version is 15).
Not sure where its getting broke.

Regards,
Vishnu

Any Update or help on the above request.
Dealing with this almost a week.

Thanks in Advance!

Vishnu.

hi @vishnu_G

  • what is the version of SonarQube that you are using?
  • what are the commands you are running to do the analysis?
  • are you running all commands from the same folder?
  • please share the verbose output of the BEGIN and END command (please run SonarScanner.MSBuild.exe begin /k:“MyProject” /d:sonar.verbose=true as the begin step, and please attach the output of BEGIN and END steps)

Hi Andrei,

  • Sonarqube version - 8.6.1

  • I have set all parameters in the classic editor of the pipeline after adding the task,Prepare analysis configuration.

  • When i try to run the commands i am facing this

Please refer the overall issue with pipeline

Thanks in Advance.

Hi @vishnu_G

MSBuild.SonarQube.Runner.exe doesn’t exist anymore, please use SonarScanner.MSBuild.exe instead.

Also, Can you share the full log of your build please ? Including prepare analysis configuration and eventually the msbuild log.

Thanks in advance.

1 Like

Thanks Caro For the update,i installed MSBuild for sonar scanner and i am able to run the begin command without any issues.
When i run the end command i am facing below issue.

I have made the settings as per requirement for SonarQubeAnalysisConfig.xml file.

Here goes the settings

Name=“sonar.login”>admin
Name=“sonar.password”>********
Name=“sonar.projectVersion”>1.0
Name=“sonar.host.url”>http://localhost:8000
Name=“sonar.projectKey”>8454156ee61c8f6913ba7500be0f08ff749a175f
SonarProeject
C:/Users/VishnuPra (F3107DF5)/Downloads/DotnetProjects/SocialGoal-master/source


Here goes the complete Run code analysis build pipeline issue details
2021-02-26T08:16:37.0408793Z ##[section]Starting: Run Code Analysis
2021-02-26T08:16:58.8593917Z ==============================================================================
2021-02-26T08:16:58.8594309Z Task : Run Code Analysis
2021-02-26T08:16:58.8594601Z Description : Run scanner and upload the results to the SonarQube server.
2021-02-26T08:16:58.8594842Z Version : 4.17.0
2021-02-26T08:16:58.8595043Z Author : sonarsource
2021-02-26T08:16:58.8595537Z Help : Version: 4.17.0. This task is not needed for Maven and Gradle projects since the scanner should be run as part of the build.

More Information
2021-02-26T08:16:58.8596070Z ==============================================================================
2021-02-26T08:17:00.5042502Z [command]“C:\SonarAgent\vsts-agent-win-x64-2.181.2 (1)_work_tasks\SonarQubePrepare_15b84ca1-b62f-4a2a-a403-89b77a063157\4.17.0\classic-sonar-scanner-msbuild\SonarScanner.MSBuild.exe” end
2021-02-26T08:17:00.5043642Z SonarScanner for MSBuild 5.0.4
2021-02-26T08:17:00.5044078Z Using the .NET Framework version of the Scanner for MSBuild
2021-02-26T08:17:00.5044498Z Post-processing started.
2021-02-26T08:17:00.5046200Z ##[error]08:17:00.429 The SonarScanner for 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 ste
    2021-02-26T08:17:00.5048166Z 08:17:00.429 The SonarScanner for MSBuild integration failed: SonarQube was unable to collect the required information about your projects.
    2021-02-26T08:17:00.5048732Z Possible causes:
    2021-02-26T08:17:00.5049984Z ##[error]ps
  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
    2021-02-26T08:17:00.5052302Z ps
    2021-02-26T08:17:00.5053059Z 2. An unsupported version of MSBuild has been used to build the project. Currently MSBuild 14.0.25420.1 and higher are supported.
    2021-02-26T08:17:00.5053856Z 3. The begin, build and end steps have not all been launched from the same folder
    2021-02-26T08:17:00.5055067Z ##[error]have a valid ProjectGuid and you have not used a solution (.sln)
    2021-02-26T08:17:00.5060727Z have a valid ProjectGuid and you have not used a solution (.sln)
    2021-02-26T08:17:00.5061398Z 08:17:00.43 Generation of the sonar-properties file failed. Unable to complete the analysis.
    2021-02-26T08:17:00.5062309Z ##[error]08:17:00.466 Post-processing failed. Exit code: 1
    2021-02-26T08:17:00.5067512Z 08:17:00.466 Post-processing failed. Exit code: 1
    2021-02-26T08:17:00.5070390Z ##[error]The process ‘C:\SonarAgent\vsts-agent-win-x64-2.181.2 (1)_work_tasks\SonarQubePrepare_15b84ca1-b62f-4a2a-a403-89b77a063157\4.17.0\classic-sonar-scanner-msbuild\SonarScanner.MSBuild.exe’ failed with exit code 1
    2021-02-26T08:17:00.5082524Z ##[section]Finishing: Run Code Analysis

Hi,

Can you share also the Prepare analysis configuration log and your build log as well ?

Thanks.

Build Log:

2021-02-26T14:06:53.4829692Z ##[debug]Evaluating condition for step: ‘Build solution’
2021-02-26T14:06:53.4831188Z ##[debug]Evaluating: succeeded()
2021-02-26T14:06:53.4831640Z ##[debug]Evaluating succeeded:
2021-02-26T14:06:53.4832684Z ##[debug]=> True
2021-02-26T14:06:53.4833184Z ##[debug]Result: True
2021-02-26T14:06:53.4833702Z ##[section]Starting: Build solution
2021-02-26T14:06:53.5056403Z ##[debug]Extracting task VSBuild from C:\SonarAgent\vsts-agent-win-x64-2.181.2 (1)_work_taskzips\VSBuild_71a9a2d3-a98a-4caa-96ab-affca411ecda_1.166.2.zip to C:\SonarAgent\vsts-agent-win-x64-2.181.2 (1)_work_tasks\VSBuild_71a9a2d3-a98a-4caa-96ab-affca411ecda\1.166.2.
2021-02-26T14:06:56.1336519Z ==============================================================================
2021-02-26T14:06:56.1336929Z Task : Visual Studio build
2021-02-26T14:06:56.1337279Z Description : Build with MSBuild and set the Visual Studio version property
2021-02-26T14:06:56.1337595Z Version : 1.166.2
2021-02-26T14:06:56.1337833Z Author : Microsoft Corporation
2021-02-26T14:06:56.1338261Z Help : https://docs.microsoft.com/azure/devops/pipelines/tasks/build/visual-studio-build
2021-02-26T14:06:56.1338679Z ==============================================================================
2021-02-26T14:06:58.5387089Z ##[debug]VstsTaskSdk 0.11.0 commit 7ff27a3e0bdd6f7b06690ae5f5b63cb84d0f23f4
2021-02-26T14:06:58.9094763Z ##[debug]Entering C:\SonarAgent\vsts-agent-win-x64-2.181.2 (1)_work_tasks\VSBuild_71a9a2d3-a98a-4caa-96ab-affca411ecda\1.166.2\VSBuild.ps1.
2021-02-26T14:06:58.9288890Z ##[debug]Loading resource strings from: C:\SonarAgent\vsts-agent-win-x64-2.181.2 (1)_work_tasks\VSBuild_71a9a2d3-a98a-4caa-96ab-affca411ecda\1.166.2\Task.json
2021-02-26T14:06:59.0484232Z ##[debug]Loaded 8 strings.
2021-02-26T14:06:59.0591076Z ##[debug]SYSTEM_CULTURE: ‘en-US’
2021-02-26T14:06:59.0611297Z ##[debug]Loading resource strings from: C:\SonarAgent\vsts-agent-win-x64-2.181.2 (1)_work_tasks\VSBuild_71a9a2d3-a98a-4caa-96ab-affca411ecda\1.166.2\Strings\resources.resjson\en-US\resources.resjson
2021-02-26T14:06:59.1076806Z ##[debug]Loaded 8 strings.
2021-02-26T14:06:59.1126723Z ##[debug]SYSTEM_DEBUG: ‘true’
2021-02-26T14:06:59.1589369Z ##[debug] Converted to bool: True
2021-02-26T14:06:59.1954927Z ##[debug]INPUT_VSVERSION: ‘latest’
2021-02-26T14:06:59.2156030Z ##[debug]INPUT_MSBUILDARCHITECTURE: ‘x86’
2021-02-26T14:06:59.2168793Z ##[debug]INPUT_MSBUILDARGS: ‘/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation=“C:\SonarAgent\vsts-agent-win-x64-2.181.2 (1)_work\1\a\”’
2021-02-26T14:06:59.2170207Z ##[debug]INPUT_SOLUTION: ‘C:\SonarAgent\vsts-agent-win-x64-2.181.2 (1)_work\1\s\StockManagement.csproj’
2021-02-26T14:06:59.2213940Z ##[debug]INPUT_PLATFORM: ‘any cpu’
2021-02-26T14:06:59.2477109Z ##[debug]INPUT_CONFIGURATION: ‘release’
2021-02-26T14:06:59.2497738Z ##[debug]INPUT_CLEAN: ‘false’
2021-02-26T14:06:59.2498653Z ##[debug] Converted to bool: False
2021-02-26T14:06:59.2499622Z ##[debug]INPUT_MAXIMUMCPUCOUNT: ‘false’
2021-02-26T14:06:59.2500401Z ##[debug] Converted to bool: False
2021-02-26T14:06:59.2501191Z ##[debug]INPUT_RESTORENUGETPACKAGES: ‘false’
2021-02-26T14:06:59.2540982Z ##[debug] Converted to bool: False
2021-02-26T14:06:59.2613108Z ##[debug]INPUT_LOGPROJECTEVENTS: ‘true’
2021-02-26T14:06:59.2618033Z ##[debug] Converted to bool: True
2021-02-26T14:06:59.2644794Z ##[debug]INPUT_CREATELOGFILE: ‘false’
2021-02-26T14:06:59.2761321Z ##[debug] Converted to bool: False
2021-02-26T14:06:59.2796818Z ##[debug]INPUT_VSLOCATION (empty)
2021-02-26T14:06:59.2879662Z ##[debug]INPUT_MSBUILDLOCATION (empty)
2021-02-26T14:06:59.2885015Z ##[debug]INPUT_MSBUILDVERSION (empty)
2021-02-26T14:06:59.3273894Z ##[debug]Loading module from path ‘C:\SonarAgent\vsts-agent-win-x64-2.181.2 (1)_work_tasks\VSBuild_71a9a2d3-a98a-4caa-96ab-affca411ecda\1.166.2\ps_modules\MSBuildHelpers\MSBuildHelpers.psm1’.
2021-02-26T14:06:59.3774999Z ##[debug]Loading resource strings from: C:\SonarAgent\vsts-agent-win-x64-2.181.2 (1)_work_tasks\VSBuild_71a9a2d3-a98a-4caa-96ab-affca411ecda\1.166.2\ps_modules\MSBuildHelpers\module.json
2021-02-26T14:06:59.3795246Z ##[debug]Loaded 9 strings.
2021-02-26T14:06:59.5400974Z ##[debug]SYSTEM_CULTURE: ‘en-US’
2021-02-26T14:06:59.8058812Z ##[debug]Loading resource strings from: C:\SonarAgent\vsts-agent-win-x64-2.181.2 (1)_work_tasks\VSBuild_71a9a2d3-a98a-4caa-96ab-affca411ecda\1.166.2\ps_modules\MSBuildHelpers\Strings\resources.resjson\en-US\resources.resjson
2021-02-26T14:06:59.8342864Z ##[debug]Loaded 9 strings.
2021-02-26T14:06:59.8943767Z ##[debug]Exporting function ‘Format-MSBuildArguments’.
2021-02-26T14:06:59.8947821Z ##[debug]Exporting function ‘Invoke-BuildTools’.
2021-02-26T14:06:59.8976358Z ##[debug]Exporting function ‘Get-MSBuildPath’.
2021-02-26T14:06:59.9070485Z ##[debug]Exporting function ‘Get-SolutionFiles’.
2021-02-26T14:06:59.9078717Z ##[debug]Exporting function ‘Get-VisualStudio’.
2021-02-26T14:06:59.9079665Z ##[debug]Exporting function ‘Select-MSBuildPath’.
2021-02-26T14:06:59.9103672Z ##[debug]Importing function ‘Format-MSBuildArguments’.
2021-02-26T14:06:59.9218899Z ##[debug]Importing function ‘Get-MSBuildPath’.
2021-02-26T14:06:59.9229080Z ##[debug]Importing function ‘Get-SolutionFiles’.
2021-02-26T14:06:59.9229847Z ##[debug]Importing function ‘Get-VisualStudio’.
2021-02-26T14:06:59.9256110Z ##[debug]Importing function ‘Invoke-BuildTools’.
2021-02-26T14:06:59.9381500Z ##[debug]Importing function ‘Select-MSBuildPath’.
2021-02-26T14:06:59.9384591Z ##[debug]Entering Get-SolutionFiles.
2021-02-26T14:06:59.9663421Z ##[debug] Solution: ‘C:\SonarAgent\vsts-agent-win-x64-2.181.2 (1)_work\1\s\StockManagement.csproj’
2021-02-26T14:06:59.9689392Z ##[debug]Leaving Get-SolutionFiles.
2021-02-26T14:06:59.9763524Z ##[debug]Entering Select-VSVersion.
2021-02-26T14:06:59.9773698Z ##[debug] PreferredVersion: ‘latest’
2021-02-26T14:07:00.0509835Z ##[debug]Entering Get-VSPath.
2021-02-26T14:07:00.0875818Z ##[debug] Version: ‘16.0’
2021-02-26T14:07:00.0917503Z ##[debug]Entering Get-VisualStudio.
2021-02-26T14:07:00.0978845Z ##[debug] MajorVersion: ‘16’
2021-02-26T14:07:00.1004676Z ##[debug]Getting latest Visual Studio 16 setup instance.
2021-02-26T14:07:00.1199578Z ##[debug]Entering Invoke-VstsTool.
2021-02-26T14:07:00.1207404Z ##[debug] FileName: ‘C:\SonarAgent\vsts-agent-win-x64-2.181.2 (1)_work_tasks\VSBuild_71a9a2d3-a98a-4caa-96ab-affca411ecda\1.166.2\ps_modules\MSBuildHelpers\vswhere.exe’
2021-02-26T14:07:00.1264801Z ##[debug] Arguments: ‘-version [16.0,17.0) -latest -format json’
2021-02-26T14:07:00.1291418Z ##[debug] RequireExitCodeZero: ‘True’
2021-02-26T14:07:00.1319480Z ##[command]“C:\SonarAgent\vsts-agent-win-x64-2.181.2 (1)_work_tasks\VSBuild_71a9a2d3-a98a-4caa-96ab-affca411ecda\1.166.2\ps_modules\MSBuildHelpers\vswhere.exe” -version [16.0,17.0) -latest -format json
2021-02-26T14:07:00.7415539Z ##[debug]
2021-02-26T14:07:00.7535794Z ##[debug]Exit code: 0
2021-02-26T14:07:00.7539131Z ##[debug]Leaving Invoke-VstsTool.
2021-02-26T14:07:00.7685829Z ##[debug]Getting latest BuildTools 16 setup instance.
2021-02-26T14:07:00.7692073Z ##[debug]Entering Invoke-VstsTool.
2021-02-26T14:07:00.7725073Z ##[debug] FileName: ‘C:\SonarAgent\vsts-agent-win-x64-2.181.2 (1)_work_tasks\VSBuild_71a9a2d3-a98a-4caa-96ab-affca411ecda\1.166.2\ps_modules\MSBuildHelpers\vswhere.exe’
2021-02-26T14:07:00.7839663Z ##[debug] Arguments: ‘-version [16.0,17.0) -products Microsoft.VisualStudio.Product.BuildTools -latest -format json’
2021-02-26T14:07:00.7845139Z ##[debug] RequireExitCodeZero: ‘True’
2021-02-26T14:07:00.7852431Z ##[command]“C:\SonarAgent\vsts-agent-win-x64-2.181.2 (1)_work_tasks\VSBuild_71a9a2d3-a98a-4caa-96ab-affca411ecda\1.166.2\ps_modules\MSBuildHelpers\vswhere.exe” -version [16.0,17.0) -products Microsoft.VisualStudio.Product.BuildTools -latest -format json
2021-02-26T14:07:00.8568896Z ##[debug]
2021-02-26T14:07:00.8582786Z ##[debug]Exit code: 0
2021-02-26T14:07:00.8621348Z ##[debug]Leaving Invoke-VstsTool.
2021-02-26T14:07:00.8675801Z ##[debug]Leaving Get-VisualStudio.
2021-02-26T14:07:00.8809542Z ##[debug]Leaving Get-VSPath.
2021-02-26T14:07:00.8888118Z ##[debug]Entering Get-VSPath.
2021-02-26T14:07:00.9150273Z ##[debug] Version: ‘15.0’
2021-02-26T14:07:00.9183508Z ##[debug]Entering Get-VisualStudio.
2021-02-26T14:07:00.9283611Z ##[debug] MajorVersion: ‘15’
2021-02-26T14:07:00.9923899Z ##[debug]Getting latest Visual Studio 15 setup instance.
2021-02-26T14:07:00.9963271Z ##[debug]Entering Invoke-VstsTool.
2021-02-26T14:07:01.0741501Z ##[debug] FileName: ‘C:\SonarAgent\vsts-agent-win-x64-2.181.2 (1)_work_tasks\VSBuild_71a9a2d3-a98a-4caa-96ab-affca411ecda\1.166.2\ps_modules\MSBuildHelpers\vswhere.exe’
2021-02-26T14:07:01.0781571Z ##[debug] Arguments: ‘-version [15.0,16.0) -latest -format json’
2021-02-26T14:07:01.0784842Z ##[debug] RequireExitCodeZero: ‘True’
2021-02-26T14:07:01.0791189Z ##[command]“C:\SonarAgent\vsts-agent-win-x64-2.181.2 (1)_work_tasks\VSBuild_71a9a2d3-a98a-4caa-96ab-affca411ecda\1.166.2\ps_modules\MSBuildHelpers\vswhere.exe” -version [15.0,16.0) -latest -format json
2021-02-26T14:07:01.1459107Z ##[debug][
2021-02-26T14:07:01.1470337Z ##[debug] {
2021-02-26T14:07:01.1502781Z ##[debug] “instanceId”: “60267898”,
2021-02-26T14:07:01.1769078Z ##[debug] “installDate”: “2021-02-11T12:28:46Z”,
2021-02-26T14:07:01.1824051Z ##[debug] “installationName”: “VisualStudio/15.9.33+28307.1401”,
2021-02-26T14:07:01.1829487Z ##[debug] “installationPath”: “C:\Program Files (x86)\Microsoft Visual Studio\2017\Community”,
2021-02-26T14:07:01.1863279Z ##[debug] “installationVersion”: “15.9.28307.1401”,
2021-02-26T14:07:01.1902595Z ##[debug] “displayName”: “Visual Studio Community 2017”,
2021-02-26T14:07:01.1944467Z ##[debug] “description”: “Free, fully-featured IDE for students, open-source and individual developers”,
2021-02-26T14:07:01.2111901Z ##[debug] “updateDate”: “2021-02-11T12:28:46.5793936Z”,
2021-02-26T14:07:01.2168498Z ##[debug] “enginePath”: “C:\Program Files (x86)\Microsoft Visual Studio\Installer\resources\app\ServiceHub\Services\Microsoft.VisualStudio.Setup.Service”,
2021-02-26T14:07:01.2171198Z ##[debug] “channelId”: “VisualStudio.15.Release”,
2021-02-26T14:07:01.2203196Z ##[debug] “channelUri”: “https://aka.ms/vs/15/release/channel”,
2021-02-26T14:07:01.2264107Z ##[debug] “releaseNotes”: “https://go.microsoft.com/fwlink/?LinkId=660692#15.9.33”,
2021-02-26T14:07:01.2273265Z ##[debug] “thirdPartyNotices”: “https://go.microsoft.com/fwlink/?LinkId=660708
2021-02-26T14:07:01.2309521Z ##[debug] }
2021-02-26T14:07:01.2430677Z ##[debug]]
2021-02-26T14:07:01.2438204Z ##[debug]Exit code: 0
2021-02-26T14:07:01.2439866Z ##[debug]Leaving Invoke-VstsTool.
2021-02-26T14:07:01.2699815Z ##[debug]Leaving Get-VisualStudio.
2021-02-26T14:07:01.2751586Z ##[debug]Leaving Get-VSPath.
2021-02-26T14:07:01.2759594Z ##[debug]Leaving Select-VSVersion.
2021-02-26T14:07:01.2942315Z ##[debug]Entering Select-MSBuildPath.
2021-02-26T14:07:01.2960816Z ##[debug] PreferredVersion: ‘15.0’
2021-02-26T14:07:01.3051122Z ##[debug] Architecture: ‘x86’
2021-02-26T14:07:01.3391233Z ##[debug]Defaulted MSBuild location method to: version
2021-02-26T14:07:01.3453593Z ##[debug]Entering Get-MSBuildPath.
2021-02-26T14:07:01.3461620Z ##[debug] Version: ‘15.0’
2021-02-26T14:07:01.3515907Z ##[debug] Architecture: ‘x86’
2021-02-26T14:07:01.3585388Z ##[debug]Entering Get-VisualStudio.
2021-02-26T14:07:01.3594321Z ##[debug] MajorVersion: ‘15’
2021-02-26T14:07:01.3606210Z ##[debug]Leaving Get-VisualStudio.
2021-02-26T14:07:01.3668106Z ##[debug]Loading C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\Microsoft.Build.Utilities.Core.dll
2021-02-26T14:07:01.7879405Z ##[debug]MSBuild: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\msbuild.exe
2021-02-26T14:07:01.7953804Z ##[debug]Leaving Get-MSBuildPath.
2021-02-26T14:07:01.8125584Z ##[debug]Leaving Select-MSBuildPath.
2021-02-26T14:07:01.8166360Z ##[debug]Entering Format-MSBuildArguments.
2021-02-26T14:07:01.8181719Z ##[debug] MSBuildArguments: ‘/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation=“C:\SonarAgent\vsts-agent-win-x64-2.181.2 (1)_work\1\a\”’
2021-02-26T14:07:01.8377982Z ##[debug] Platform: ‘any cpu’
2021-02-26T14:07:01.8382886Z ##[debug] Configuration: ‘release’
2021-02-26T14:07:01.8385169Z ##[debug] VSVersion: ‘15.0’
2021-02-26T14:07:01.8397935Z ##[debug] MaximumCpuCount: ‘False’
2021-02-26T14:07:01.8858600Z ##[debug]AZURE_HTTP_USER_AGENT: ‘VSTS_ae9d253d-2f67-4f32-9967-30c71a6197c8_build_58_0’
2021-02-26T14:07:01.8863761Z ##[debug]Leaving Format-MSBuildArguments.
2021-02-26T14:07:01.8865228Z ##[debug]Entering Invoke-BuildTools.
2021-02-26T14:07:01.8900482Z ##[debug] NuGetRestore: ‘False’
2021-02-26T14:07:01.8960922Z ##[debug] SolutionFiles: ‘C:\SonarAgent\vsts-agent-win-x64-2.181.2 (1)_work\1\s\StockManagement.csproj’
2021-02-26T14:07:01.8963750Z ##[debug] MSBuildLocation: ‘C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\msbuild.exe’
2021-02-26T14:07:01.8999580Z ##[debug] MSBuildArguments: ‘/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation=“C:\SonarAgent\vsts-agent-win-x64-2.181.2 (1)_work\1\a\” /p:platform=“any cpu” /p:configuration=“release” /p:VisualStudioVersion=“15.0” /p:_MSDeployUserAgent=“VSTS_ae9d253d-2f67-4f32-9967-30c71a6197c8_build_58_0”’
2021-02-26T14:07:01.9088264Z ##[debug] Clean: ‘False’
2021-02-26T14:07:01.9122566Z ##[debug] NoTimelineLogger: ‘False’
2021-02-26T14:07:01.9123882Z ##[debug] CreateLogFile: ‘True’
2021-02-26T14:07:01.9180959Z ##[debug] LogFileVerbosity: ‘diagnostic’
2021-02-26T14:07:01.9395186Z ##[debug]Entering Invoke-MSBuild.
2021-02-26T14:07:01.9399079Z ##[debug] ProjectFile: ‘C:\SonarAgent\vsts-agent-win-x64-2.181.2 (1)_work\1\s\StockManagement.csproj’
2021-02-26T14:07:01.9464003Z ##[debug] MSBuildPath: ‘C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\msbuild.exe’
2021-02-26T14:07:01.9553188Z ##[debug] AdditionalArguments: ‘/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation=“C:\SonarAgent\vsts-agent-win-x64-2.181.2 (1)_work\1\a\” /p:platform=“any cpu” /p:configuration=“release” /p:VisualStudioVersion=“15.0” /p:_MSDeployUserAgent=“VSTS_ae9d253d-2f67-4f32-9967-30c71a6197c8_build_58_0”’
2021-02-26T14:07:01.9558193Z ##[debug] NoTimelineLogger: ‘False’
2021-02-26T14:07:01.9559208Z ##[debug] LogFileVerbosity: ‘diagnostic’
2021-02-26T14:07:01.9630646Z ##[debug] LogFile: ‘C:\SonarAgent\vsts-agent-win-x64-2.181.2 (1)_work\1\s\StockManagement.csproj.log’
2021-02-26T14:07:02.0094766Z ##[debug]Asserting leaf path exists: ‘C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\msbuild.exe’
2021-02-26T14:07:02.0744023Z ##[debug]Processed: ##vso[task.logdetail id=87579075-5eb1-4b14-90a3-68320c61ffdb;type=Process;progress=0;state=Initialized;name=Build StockManagement.csproj;starttime=2021-02-26T14:07:02.0029860Z]
2021-02-26T14:07:02.0768162Z ##[debug]Asserting leaf path exists: ‘C:\SonarAgent\vsts-agent-win-x64-2.181.2 (1)_work_tasks\VSBuild_71a9a2d3-a98a-4caa-96ab-affca411ecda\1.166.2\ps_modules\MSBuildHelpers\Microsoft.TeamFoundation.DistributedTask.MSBuild.Logger.dll’
2021-02-26T14:07:02.0800203Z ##[debug]Entering Invoke-VstsTool.
2021-02-26T14:07:02.0840284Z ##[debug] FileName: ‘C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\msbuild.exe’
2021-02-26T14:07:02.0895729Z ##[debug] Arguments: ‘“C:\SonarAgent\vsts-agent-win-x64-2.181.2 (1)_work\1\s\StockManagement.csproj” /nologo /nr:false /fl /flp:“logfile=C:\SonarAgent\vsts-agent-win-x64-2.181.2 (1)_work\1\s\StockManagement.csproj.log;verbosity=diagnostic” /dl:CentralLogger,“C:\SonarAgent\vsts-agent-win-x64-2.181.2 (1)_work_tasks\VSBuild_71a9a2d3-a98a-4caa-96ab-affca411ecda\1.166.2\ps_modules\MSBuildHelpers\Microsoft.TeamFoundation.DistributedTask.MSBuild.Logger.dll”;“RootDetailId=87579075-5eb1-4b14-90a3-68320c61ffdb|SolutionDir=C:\SonarAgent\vsts-agent-win-x64-2.181.2 (1)_work\1\s”*ForwardingLogger,“C:\SonarAgent\vsts-agent-win-x64-2.181.2 (1)_work_tasks\VSBuild_71a9a2d3-a98a-4caa-96ab-affca411ecda\1.166.2\ps_modules\MSBuildHelpers\Microsoft.TeamFoundation.DistributedTask.MSBuild.Logger.dll” /p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation=“C:\SonarAgent\vsts-agent-win-x64-2.181.2 (1)_work\1\a\” /p:platform=“any cpu” /p:configuration=“release” /p:VisualStudioVersion=“15.0” /p:_MSDeployUserAgent=“VSTS_ae9d253d-2f67-4f32-9967-30c71a6197c8_build_58_0”’
2021-02-26T14:07:02.0900197Z ##[debug] RequireExitCodeZero: ‘True’
2021-02-26T14:07:02.0909663Z ##[command]“C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\msbuild.exe” “C:\SonarAgent\vsts-agent-win-x64-2.181.2 (1)_work\1\s\StockManagement.csproj” /nologo /nr:false /fl /flp:“logfile=C:\SonarAgent\vsts-agent-win-x64-2.181.2 (1)_work\1\s\StockManagement.csproj.log;verbosity=diagnostic” /dl:CentralLogger,“C:\SonarAgent\vsts-agent-win-x64-2.181.2 (1)_work_tasks\VSBuild_71a9a2d3-a98a-4caa-96ab-affca411ecda\1.166.2\ps_modules\MSBuildHelpers\Microsoft.TeamFoundation.DistributedTask.MSBuild.Logger.dll”;“RootDetailId=87579075-5eb1-4b14-90a3-68320c61ffdb|SolutionDir=C:\SonarAgent\vsts-agent-win-x64-2.181.2 (1)_work\1\s”*ForwardingLogger,“C:\SonarAgent\vsts-agent-win-x64-2.181.2 (1)_work_tasks\VSBuild_71a9a2d3-a98a-4caa-96ab-affca411ecda\1.166.2\ps_modules\MSBuildHelpers\Microsoft.TeamFoundation.DistributedTask.MSBuild.Logger.dll” /p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation=“C:\SonarAgent\vsts-agent-win-x64-2.181.2 (1)_work\1\a\” /p:platform=“any cpu” /p:configuration=“release” /p:VisualStudioVersion=“15.0” /p:_MSDeployUserAgent=“VSTS_ae9d253d-2f67-4f32-9967-30c71a6197c8_build_58_0”
2021-02-26T14:07:02.7726022Z Build started 2/26/2021 2:07:02 PM.
2021-02-26T14:07:03.3000420Z ##[debug]Processed: ##vso[task.logdetail id=4fe5b846-db80-4685-9aeb-73af9295bfd6;parentid=87579075-5eb1-4b14-90a3-68320c61ffdb;name=StockManagement.csproj;type=Build;starttime=2021-02-26T14:07:03.2968686Z;state=InProgress;]
2021-02-26T14:07:03.4097989Z ##[warning]C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(781,5): Warning : The OutputPath property is not set for project ‘StockManagement.csproj’. Please check to make sure that you have specified a valid combination of Configuration and Platform for this project. Configuration=‘release’ Platform=‘any cpu’. You may be seeing this message because you are trying to build a project without a solution file, and have specified a non-default Configuration or Platform that doesn’t exist for this project.
2021-02-26T14:07:03.4108886Z ##[debug]Processed: ##vso[task.logissue type=Warning;sourcepath=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets;linenumber=781;columnnumber=5;code=;]The OutputPath property is not set for project ‘StockManagement.csproj’. Please check to make sure that you have specified a valid combination of Configuration and Platform for this project. Configuration=‘release’ Platform=‘any cpu’. You may be seeing this message because you are trying to build a project without a solution file, and have specified a non-default Configuration or Platform that doesn’t exist for this project.
2021-02-26T14:07:03.4110806Z Project “C:\SonarAgent\vsts-agent-win-x64-2.181.2 (1)_work\1\s\StockManagement.csproj” on node 1 (default targets).
2021-02-26T14:07:03.4133436Z C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(781,5): warning : The OutputPath property is not set for project ‘StockManagement.csproj’. Please check to make sure that you have specified a valid combination of Configuration and Platform for this project. Configuration=‘release’ Platform=‘any cpu’. You may be seeing this message because you are trying to build a project without a solution file, and have specified a non-default Configuration or Platform that doesn’t exist for this project. [C:\SonarAgent\vsts-agent-win-x64-2.181.2 (1)_work\1\s\StockManagement.csproj]
2021-02-26T14:07:03.4141497Z ##[debug]Processed: ##vso[task.logdetail id=4fe5b846-db80-4685-9aeb-73af9295bfd6;parentid=87579075-5eb1-4b14-90a3-68320c61ffdb;type=Build;result=Succeeded;finishtime=2021-02-26T14:07:03.4038614Z;progress=100;state=Completed;parentid=87579075-5eb1-4b14-90a3-68320c61ffdb;name=;]
2021-02-26T14:07:03.4152710Z Done Building Project “C:\SonarAgent\vsts-agent-win-x64-2.181.2 (1)_work\1\s\StockManagement.csproj” (default targets).
2021-02-26T14:07:03.4153317Z
2021-02-26T14:07:03.4153683Z Build succeeded.
2021-02-26T14:07:03.4233270Z
2021-02-26T14:07:03.4234031Z “C:\SonarAgent\vsts-agent-win-x64-2.181.2 (1)_work\1\s\StockManagement.csproj” (default target) (1) →
2021-02-26T14:07:03.4234896Z (_CheckForInvalidConfigurationAndPlatform target) →
2021-02-26T14:07:03.4236601Z C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(781,5): warning : The OutputPath property is not set for project ‘StockManagement.csproj’. Please check to make sure that you have specified a valid combination of Configuration and Platform for this project. Configuration=‘release’ Platform=‘any cpu’. You may be seeing this message because you are trying to build a project without a solution file, and have specified a non-default Configuration or Platform that doesn’t exist for this project. [C:\SonarAgent\vsts-agent-win-x64-2.181.2 (1)_work\1\s\StockManagement.csproj]
2021-02-26T14:07:03.4240345Z
2021-02-26T14:07:03.4240999Z 1 Warning(s)
2021-02-26T14:07:03.4242217Z 0 Error(s)
2021-02-26T14:07:03.4263171Z
2021-02-26T14:07:03.4273706Z Time Elapsed 00:00:00.64
2021-02-26T14:07:03.4965435Z ##[debug]Exit code: 0
2021-02-26T14:07:03.5097866Z ##[debug]Leaving Invoke-VstsTool.
2021-02-26T14:07:03.5106932Z ##[debug]Processed: ##vso[task.logdetail finishtime=2021-02-26T14:07:03.4898527Z;id=87579075-5eb1-4b14-90a3-68320c61ffdb;progress=100;state=Completed;result=Succeeded]
2021-02-26T14:07:03.5160052Z ##[debug]Processed: ##vso[task.uploadfile]C:\SonarAgent\vsts-agent-win-x64-2.181.2 (1)_work\1\s\StockManagement.csproj.log
2021-02-26T14:07:03.5431557Z ##[debug]Leaving Invoke-MSBuild.
2021-02-26T14:07:03.5469954Z ##[debug]Leaving Invoke-BuildTools.
2021-02-26T14:07:03.5483460Z ##[debug]Leaving C:\SonarAgent\vsts-agent-win-x64-2.181.2 (1)_work_tasks\VSBuild_71a9a2d3-a98a-4caa-96ab-affca411ecda\1.166.2\VSBuild.ps1.
2021-02-26T14:07:03.6150728Z ##[section]Finishing: Build solution.

PrepareAnalysis log:

2021-02-26T14:07:47.7506511Z ##[debug]Evaluating condition for step: ‘Prepare analysis on SonarQube’
2021-02-26T14:07:47.7508311Z ##[debug]Evaluating: succeeded()
2021-02-26T14:07:47.7508819Z ##[debug]Evaluating succeeded:
2021-02-26T14:07:47.7510314Z ##[debug]=> True
2021-02-26T14:07:47.7511040Z ##[debug]Result: True
2021-02-26T14:07:47.7511625Z ##[section]Starting: Prepare analysis on SonarQube
2021-02-26T14:07:47.7819015Z ##[debug]Extracting task SonarQubePrepare from C:\SonarAgent\vsts-agent-win-x64-2.181.2 (1)_work_taskzips\SonarQubePrepare_15b84ca1-b62f-4a2a-a403-89b77a063157_4.17.0.zip to C:\SonarAgent\vsts-agent-win-x64-2.181.2 (1)_work_tasks\SonarQubePrepare_15b84ca1-b62f-4a2a-a403-89b77a063157\4.17.0.
2021-02-26T14:08:12.1366792Z ==============================================================================
2021-02-26T14:08:12.1367201Z Task : Prepare Analysis Configuration
2021-02-26T14:08:12.1367512Z Description : Prepare SonarQube analysis configuration
2021-02-26T14:08:12.1367811Z Version : 4.17.0
2021-02-26T14:08:12.1368083Z Author : sonarsource
2021-02-26T14:08:12.1368463Z Help : Version: 4.17.0. More Information
2021-02-26T14:08:12.1368912Z ==============================================================================
2021-02-26T14:08:12.1441558Z ##[debug]Using node path: C:\SonarAgent\vsts-agent-win-x64-2.181.2 (1)\externals\node\bin\node.exe
2021-02-26T14:08:12.8996555Z ##[debug]agent.TempDirectory=C:\SonarAgent\vsts-agent-win-x64-2.181.2 (1)_work_temp
2021-02-26T14:08:13.1706225Z ##[debug]loading inputs and endpoints
2021-02-26T14:08:13.4361629Z ##[debug]loading ENDPOINT_AUTH_943b74f8-6536-4381-9e11-fc940ed81a94
2021-02-26T14:08:13.6827853Z ##[debug]loading ENDPOINT_AUTH_PARAMETER_943b74f8-6536-4381-9e11-fc940ed81a94_USERNAME
2021-02-26T14:08:13.6862596Z ##[debug]loading ENDPOINT_AUTH_PARAMETER_SYSTEMVSSCONNECTION_ACCESSTOKEN
2021-02-26T14:08:13.6871546Z ##[debug]loading ENDPOINT_AUTH_SCHEME_943b74f8-6536-4381-9e11-fc940ed81a94
2021-02-26T14:08:13.6897176Z ##[debug]loading ENDPOINT_AUTH_SCHEME_SYSTEMVSSCONNECTION
2021-02-26T14:08:13.6927842Z ##[debug]loading ENDPOINT_AUTH_SYSTEMVSSCONNECTION
2021-02-26T14:08:13.7393598Z ##[debug]loading INPUT_CLIPROJECTVERSION
2021-02-26T14:08:13.7401490Z ##[debug]loading INPUT_CLISOURCES
2021-02-26T14:08:13.7409415Z ##[debug]loading INPUT_CONFIGFILE
2021-02-26T14:08:13.7410193Z ##[debug]loading INPUT_CONFIGMODE
2021-02-26T14:08:13.7411150Z ##[debug]loading INPUT_EXTRAPROPERTIES
2021-02-26T14:08:13.7411760Z ##[debug]loading INPUT_PROJECTKEY
2021-02-26T14:08:13.7412353Z ##[debug]loading INPUT_PROJECTVERSION
2021-02-26T14:08:13.7412948Z ##[debug]loading INPUT_SCANNERMODE
2021-02-26T14:08:13.7413572Z ##[debug]loading INPUT_SONARQUBE
2021-02-26T14:08:13.7414185Z ##[debug]loaded 15
2021-02-26T14:08:13.7419777Z ##[debug]Agent.ProxyUrl=undefined
2021-02-26T14:08:13.7420396Z ##[debug]Agent.CAInfo=undefined
2021-02-26T14:08:13.7420953Z ##[debug]Agent.ClientCert=undefined
2021-02-26T14:08:13.7421683Z ##[debug]Agent.SkipCertValidation=undefined
2021-02-26T14:08:13.7422480Z ##[debug]SonarQube=943b74f8-6536-4381-9e11-fc940ed81a94
2021-02-26T14:08:13.7423148Z ##[debug]943b74f8-6536-4381-9e11-fc940ed81a94=http://localhost:8000/
2021-02-26T14:08:13.7423856Z ##[debug]943b74f8-6536-4381-9e11-fc940ed81a94 auth param apitoken = null
2021-02-26T14:08:13.7425072Z ##[debug]943b74f8-6536-4381-9e11-fc940ed81a94 auth param username = ***
2021-02-26T14:08:13.7425902Z ##[debug]943b74f8-6536-4381-9e11-fc940ed81a94 auth param password = null
2021-02-26T14:08:13.7426429Z ##[debug]organization=null
2021-02-26T14:08:13.7426893Z ##[debug]scannerMode=MSBuild
2021-02-26T14:08:13.7427623Z ##[debug]projectKey=***
2021-02-26T14:08:13.7435203Z ##[debug]projectName=null
2021-02-26T14:08:13.7435734Z ##[debug]projectVersion=1.0
2021-02-26T14:08:13.7436194Z ##[debug]organization=null
2021-02-26T14:08:13.7436712Z ##[debug][SQ] API GET: ‘/api/server/version’ with query “undefined”
2021-02-26T14:08:13.7439959Z ##[debug]Response: 200 Body: “8.6.1.40680”
2021-02-26T14:08:13.7440811Z ##[debug]System.TeamFoundationCollectionUri=https://dev.azure.com/NTTDATA-DTA-ORG/
2021-02-26T14:08:13.7441437Z ##[debug]System.PullRequest.PullRequestId=undefined
2021-02-26T14:08:13.7442163Z ##[debug]Build.Repository.Provider=TfsGit
2021-02-26T14:08:13.7442837Z ##[debug]Build.SourceBranch=refs/heads/main
2021-02-26T14:08:13.7443264Z SYSTEMVSSCONNECTION exists true
2021-02-26T14:08:13.7443722Z ##[debug]SYSTEMVSSCONNECTION exists true
2021-02-26T14:08:13.9819493Z ##[debug]Build.Repository.Name=SonarHost
2021-02-26T14:08:13.9820863Z ##[debug]System.TeamProject=Azure DevOps Demo
2021-02-26T14:08:14.1488602Z ##[debug]Default branch of this repository is ‘refs/heads/main’
2021-02-26T14:08:14.1568535Z ##[debug]SonarCloud or SonarQube version >= 7.2.0 detected, setting report-task.txt file to its newest location.
2021-02-26T14:08:14.1689631Z ##[debug]Agent.TempDirectory=C:\SonarAgent\vsts-agent-win-x64-2.181.2 (1)_work_temp
2021-02-26T14:08:14.1692229Z ##[debug]Build.BuildNumber=20210226.1
2021-02-26T14:08:14.1693527Z ##[debug][SQ] Branch and PR parameters: {“sonar.scanner.metadataFilePath”:“C:\SonarAgent\vsts-agent-win-x64-2.181.2 (1)\_work\_temp\sonar\20210226.1\fa27b54b-f4ad-cbf3-6d4e-990dd1fb4f7d\report-task.txt”}
2021-02-26T14:08:14.1698563Z ##[debug]extraProperties=# Additional properties that will be passed to the scanner,

Put one key=value per line, example:

sonar.exclusions=**/*.bin

2021-02-26T14:08:14.1725931Z ##[debug]set SONARQUBE_SCANNER_MODE=MSBuild
2021-02-26T14:08:14.1735768Z ##[debug]Processed: ##vso[task.setvariable variable=SONARQUBE_SCANNER_MODE;issecret=false;]MSBuild
2021-02-26T14:08:14.1736787Z ##[debug]set SONARQUBE_ENDPOINT=********
2021-02-26T14:08:14.1742912Z ##[debug]Processed: ##vso[task.setvariable variable=SONARQUBE_ENDPOINT;issecret=true;]***
2021-02-26T14:08:14.1807844Z ##[debug]set SONARQUBE_SCANNER_PARAMS={“sonar.host.url”:“http://localhost:8000/","sonar.login”:,“sonar.projectKey”:,“sonar.projectVersion”:“1.0”,“sonar.scanner.metadataFilePath”:“C:\SonarAgent\vsts-agent-win-x64-2.181.2 (1)\_work\_temp\sonar\20210226.1\fa27b54b-f4ad-cbf3-6d4e-990dd1fb4f7d\report-task.txt”}
2021-02-26T14:08:14.1832362Z ##[debug]Processed: ##vso[task.setvariable variable=SONARQUBE_SCANNER_PARAMS;issecret=false;]{“sonar.host.url”:“http://localhost:8000/","sonar.login”:,“sonar.projectKey”:,“sonar.projectVersion”:“1.0”,“sonar.scanner.metadataFilePath”:“C:\SonarAgent\vsts-agent-win-x64-2.181.2 (1)\_work\_temp\sonar\20210226.1\fa27b54b-f4ad-cbf3-6d4e-990dd1fb4f7d\report-task.txt”}
2021-02-26T14:08:14.2001804Z ##[debug]Absolute path for pathSegments: C:\SonarAgent\vsts-agent-win-x64-2.181.2 (1)_work_tasks\SonarQubePrepare_15b84ca1-b62f-4a2a-a403-89b77a063157\4.17.0,classic-sonar-scanner-msbuild,SonarScanner.MSBuild.exe = C:\SonarAgent\vsts-agent-win-x64-2.181.2 (1)_work_tasks\SonarQubePrepare_15b84ca1-b62f-4a2a-a403-89b77a063157\4.17.0\classic-sonar-scanner-msbuild\SonarScanner.MSBuild.exe
2021-02-26T14:08:14.2047599Z ##[debug]Using classic scanner at C:\SonarAgent\vsts-agent-win-x64-2.181.2 (1)_work_tasks\SonarQubePrepare_15b84ca1-b62f-4a2a-a403-89b77a063157\4.17.0\classic-sonar-scanner-msbuild\SonarScanner.MSBuild.exe
2021-02-26T14:08:14.2053019Z ##[debug]set SONARQUBE_SCANNER_MSBUILD_EXE=C:\SonarAgent\vsts-agent-win-x64-2.181.2 (1)_work_tasks\SonarQubePrepare_15b84ca1-b62f-4a2a-a403-89b77a063157\4.17.0\classic-sonar-scanner-msbuild\SonarScanner.MSBuild.exe
2021-02-26T14:08:14.2350751Z ##[debug]Processed: ##vso[task.setvariable variable=SONARQUBE_SCANNER_MSBUILD_EXE;issecret=false;]C:\SonarAgent\vsts-agent-win-x64-2.181.2 (1)_work_tasks\SonarQubePrepare_15b84ca1-b62f-4a2a-a403-89b77a063157\4.17.0\classic-sonar-scanner-msbuild\SonarScanner.MSBuild.exe
2021-02-26T14:08:14.3735170Z ##[debug]which ‘C:\SonarAgent\vsts-agent-win-x64-2.181.2 (1)_work_tasks\SonarQubePrepare_15b84ca1-b62f-4a2a-a403-89b77a063157\4.17.0\classic-sonar-scanner-msbuild\SonarScanner.MSBuild.exe’
2021-02-26T14:08:14.3919923Z ##[debug]found: ‘C:\SonarAgent\vsts-agent-win-x64-2.181.2 (1)_work_tasks\SonarQubePrepare_15b84ca1-b62f-4a2a-a403-89b77a063157\4.17.0\classic-sonar-scanner-msbuild\SonarScanner.MSBuild.exe’
2021-02-26T14:08:14.3927483Z ##[debug]which ‘C:\SonarAgent\vsts-agent-win-x64-2.181.2 (1)_work_tasks\SonarQubePrepare_15b84ca1-b62f-4a2a-a403-89b77a063157\4.17.0\classic-sonar-scanner-msbuild\SonarScanner.MSBuild.exe’
2021-02-26T14:08:14.3930967Z ##[debug]found: ‘C:\SonarAgent\vsts-agent-win-x64-2.181.2 (1)_work_tasks\SonarQubePrepare_15b84ca1-b62f-4a2a-a403-89b77a063157\4.17.0\classic-sonar-scanner-msbuild\SonarScanner.MSBuild.exe’
2021-02-26T14:08:14.3954168Z ##[debug]C:\SonarAgent\vsts-agent-win-x64-2.181.2 (1)_work_tasks\SonarQubePrepare_15b84ca1-b62f-4a2a-a403-89b77a063157\4.17.0\classic-sonar-scanner-msbuild\SonarScanner.MSBuild.exe arg: begin
2021-02-26T14:08:14.3975401Z ##[debug]C:\SonarAgent\vsts-agent-win-x64-2.181.2 (1)_work_tasks\SonarQubePrepare_15b84ca1-b62f-4a2a-a403-89b77a063157\4.17.0\classic-sonar-scanner-msbuild\SonarScanner.MSBuild.exe arg: /k:***
2021-02-26T14:08:14.3993877Z ##[debug]system.debug=true
2021-02-26T14:08:14.4338352Z ##[debug]C:\SonarAgent\vsts-agent-win-x64-2.181.2 (1)_work_tasks\SonarQubePrepare_15b84ca1-b62f-4a2a-a403-89b77a063157\4.17.0\classic-sonar-scanner-msbuild\SonarScanner.MSBuild.exe arg: /d:sonar.verbose=true
2021-02-26T14:08:14.4345068Z ##[debug]exec tool: C:\SonarAgent\vsts-agent-win-x64-2.181.2 (1)_work_tasks\SonarQubePrepare_15b84ca1-b62f-4a2a-a403-89b77a063157\4.17.0\classic-sonar-scanner-msbuild\SonarScanner.MSBuild.exe
2021-02-26T14:08:14.4351619Z ##[debug]arguments:
2021-02-26T14:08:14.4366232Z ##[debug] begin
2021-02-26T14:08:14.4420458Z ##[debug] /k:***
2021-02-26T14:08:14.4772834Z ##[debug] /d:sonar.verbose=true
2021-02-26T14:08:14.4776330Z [command]“C:\SonarAgent\vsts-agent-win-x64-2.181.2 (1)_work_tasks\SonarQubePrepare_15b84ca1-b62f-4a2a-a403-89b77a063157\4.17.0\classic-sonar-scanner-msbuild\SonarScanner.MSBuild.exe” begin /k:*** /d:sonar.verbose=true
2021-02-26T14:08:14.4783379Z SonarScanner for MSBuild 5.0.4
2021-02-26T14:08:14.4943178Z Using the .NET Framework version of the Scanner for MSBuild
2021-02-26T14:08:14.5358581Z Default properties file was found at C:\SonarAgent\vsts-agent-win-x64-2.181.2 (1)_work_tasks\SonarQubePrepare_15b84ca1-b62f-4a2a-a403-89b77a063157\4.17.0\classic-sonar-scanner-msbuild\SonarQube.Analysis.xml
2021-02-26T14:08:14.5432032Z Loading analysis properties from C:\SonarAgent\vsts-agent-win-x64-2.181.2 (1)_work_tasks\SonarQubePrepare_15b84ca1-b62f-4a2a-a403-89b77a063157\4.17.0\classic-sonar-scanner-msbuild\SonarQube.Analysis.xml
2021-02-26T14:08:14.5561834Z sonar.verbose=true was specified - setting the log verbosity to ‘Debug’
2021-02-26T14:08:14.5564180Z Pre-processing started.
2021-02-26T14:08:14.5565307Z Preparing working directories…
2021-02-26T14:08:14.5584784Z Using environment variables to determine the download directory…
2021-02-26T14:08:14.6388603Z Using environment variable ‘AGENT_BUILDDIRECTORY’, value ‘C:\SonarAgent\vsts-agent-win-x64-2.181.2 (1)_work\1’
2021-02-26T14:08:14.6489830Z 14:08:14.632 14:08:14.619 Loading analysis properties from C:\SonarAgent\vsts-agent-win-x64-2.181.2 (1)_work_tasks\SonarQubePrepare_15b84ca1-b62f-4a2a-a403-89b77a063157\4.17.0\classic-sonar-scanner-msbuild\SonarQube.Analysis.xml
2021-02-26T14:08:14.6507797Z 14:08:14.632 14:08:14.632 sonar.verbose=true was specified - setting the log verbosity to ‘Debug’
2021-02-26T14:08:14.6601893Z 14:08:14.637 Updating build integration targets…
2021-02-26T14:08:14.6630104Z 14:08:14.658 Installed SonarQube.Integration.ImportBefore.targets to C:\Windows\ServiceProfiles\NetworkService\AppData\Local\Microsoft\MSBuild\4.0\Microsoft.Common.targets\ImportBefore
2021-02-26T14:08:14.6648629Z 14:08:14.66 Installed SonarQube.Integration.ImportBefore.targets to C:\Windows\ServiceProfiles\NetworkService\AppData\Local\Microsoft\MSBuild\10.0\Microsoft.Common.targets\ImportBefore
2021-02-26T14:08:14.6673101Z 14:08:14.663 Installed SonarQube.Integration.ImportBefore.targets to C:\Windows\ServiceProfiles\NetworkService\AppData\Local\Microsoft\MSBuild\11.0\Microsoft.Common.targets\ImportBefore
2021-02-26T14:08:14.6792836Z 14:08:14.666 Installed SonarQube.Integration.ImportBefore.targets to C:\Windows\ServiceProfiles\NetworkService\AppData\Local\Microsoft\MSBuild\12.0\Microsoft.Common.targets\ImportBefore
2021-02-26T14:08:14.6911420Z 14:08:14.667 Installed SonarQube.Integration.ImportBefore.targets to C:\Windows\ServiceProfiles\NetworkService\AppData\Local\Microsoft\MSBuild\14.0\Microsoft.Common.targets\ImportBefore
2021-02-26T14:08:14.6974839Z 14:08:14.672 Installed SonarQube.Integration.ImportBefore.targets to C:\Windows\ServiceProfiles\NetworkService\AppData\Local\Microsoft\MSBuild\15.0\Microsoft.Common.targets\ImportBefore
2021-02-26T14:08:14.6990008Z 14:08:14.674 Installed SonarQube.Integration.ImportBefore.targets to C:\Windows\ServiceProfiles\NetworkService\AppData\Local\Microsoft\MSBuild\Current\Microsoft.Common.targets\ImportBefore
2021-02-26T14:08:14.6992188Z 14:08:14.685 Installed SonarQube.Integration.targets to C:\SonarAgent\vsts-agent-win-x64-2.181.2 (1)_work\1.sonarqube\bin\targets
2021-02-26T14:08:14.7375184Z 14:08:14.687 Creating config and output folders…
2021-02-26T14:08:14.7420215Z 14:08:14.688 Creating directory: C:\SonarAgent\vsts-agent-win-x64-2.181.2 (1)_work\1.sonarqube\conf
2021-02-26T14:08:14.7428505Z 14:08:14.689 Creating directory: C:\SonarAgent\vsts-agent-win-x64-2.181.2 (1)_work\1.sonarqube\out
2021-02-26T14:08:14.7675757Z 14:08:14.766 Downloading from http://localhost:8000/api/server/version
2021-02-26T14:08:14.8216530Z 14:08:14.815 Checking validity of server license
2021-02-26T14:08:14.8218140Z 14:08:14.818 Downloading from http://localhost:8000/api/editions/is_valid_license
2021-02-26T14:08:14.8765149Z 14:08:14.837 SonarQube Community Edition detected, license is valid.
2021-02-26T14:08:15.0444911Z 14:08:14.845 Fetching analysis configuration settings…
2021-02-26T14:08:15.0458895Z 14:08:14.854 Fetching properties for project ‘’ from http://localhost:8000/api/settings/values?component=
2021-02-26T14:08:15.0473947Z 14:08:14.858 Downloading from http://localhost:8000/api/settings/values?component=
2021-02-26T14:08:15.0480936Z 14:08:14.872 No settings for project . Getting global settings: http://localhost:8000/api/settings/values
2021-02-26T14:08:15.0659125Z 14:08:14.873 Downloading from http://localhost:8000/api/settings/values
2021-02-26T14:08:15.0681271Z 14:08:14.916 Downloading from http://localhost:8000/api/languages/list
2021-02-26T14:08:15.0682504Z 14:08:15.021 Fetching quality profile for project '
’ from http://localhost:8000/api/qualityprofiles/search?project=

2021-02-26T14:08:15.0687183Z 14:08:15.031 Downloading from http://localhost:8000/api/qualityprofiles/search?project=
2021-02-26T14:08:15.0690336Z 14:08:15.045 Fetching quality profile for project '
’ from http://localhost:8000/api/qualityprofiles/search?defaults=true
2021-02-26T14:08:15.0696431Z 14:08:15.048 Downloading from http://localhost:8000/api/qualityprofiles/search?defaults=true
2021-02-26T14:08:15.5092076Z 14:08:15.102 Fetching active rules for quality profile ‘AXekT–_JAjXn7bRjgpd’ from http://localhost:8000/api/rules/search?f=repo,name,severity,lang,internalKey,templateKey,params,actives&ps=500&activation=true&qprofile=AXekT--_JAjXn7bRjgpd&p=1
2021-02-26T14:08:15.6663046Z 14:08:15.104 Downloading from http://localhost:8000/api/rules/search?f=repo,name,severity,lang,internalKey,templateKey,params,actives&ps=500&activation=true&qprofile=AXekT--_JAjXn7bRjgpd&p=1
2021-02-26T14:08:15.6720164Z 14:08:15.482 Fetching rules not active in quality profile ‘AXekT–_JAjXn7bRjgpd’ for language ‘cs’ from http://localhost:8000/api/rules/search?f=repo,name,severity,lang,internalKey,templateKey,params&ps=500&activation=false&qprofile=AXekT--_JAjXn7bRjgpd&p=1&languages=cs
2021-02-26T14:08:15.6762115Z 14:08:15.484 Downloading from http://localhost:8000/api/rules/search?f=repo,name,severity,lang,internalKey,templateKey,params&ps=500&activation=false&qprofile=AXekT--_JAjXn7bRjgpd&p=1&languages=cs
2021-02-26T14:08:15.6850079Z 14:08:15.624 Local analyzer cache: C:\Windows\ServiceProfiles\NetworkService\AppData\Local\Temp.sonarqube\resources
2021-02-26T14:08:15.7076644Z 14:08:15.648 Writing Roslyn generated ruleset to C:\SonarAgent\vsts-agent-win-x64-2.181.2 (1)_work\1.sonarqube\conf\SonarQubeRoslyn-cs.ruleset…
2021-02-26T14:08:15.7978031Z 14:08:15.68 Writing Roslyn generated ruleset to C:\SonarAgent\vsts-agent-win-x64-2.181.2 (1)_work\1.sonarqube\conf\SonarQubeRoslyn-cs-test.ruleset…
2021-02-26T14:08:15.8496867Z 14:08:15.699 Provisioning analyzer assemblies for cs…
2021-02-26T14:08:15.8611588Z 14:08:15.701 Installing required Roslyn analyzers…
2021-02-26T14:08:15.8636957Z 14:08:15.702 Processing plugin: csharp version 8.15.0.24505
2021-02-26T14:08:15.9430278Z 14:08:15.94 Cache hit: using plugin files from C:\Windows\ServiceProfiles\NetworkService\AppData\Local\Temp.sonarqube\resources\0
2021-02-26T14:08:15.9680917Z 14:08:15.941 Processing plugin: vbnet version 8.15.0.24505
2021-02-26T14:08:16.1026709Z 14:08:15.943 Cache hit: using plugin files from C:\Windows\ServiceProfiles\NetworkService\AppData\Local\Temp.sonarqube\resources\1
2021-02-26T14:08:16.2857666Z 14:08:15.953 Writing Roslyn analyzer additional file to C:\SonarAgent\vsts-agent-win-x64-2.181.2 (1)_work\1.sonarqube\conf\cs\SonarLint.xml…
2021-02-26T14:08:16.4731941Z 14:08:15.962 Fetching quality profile for project ‘’ from http://localhost:8000/api/qualityprofiles/search?project=
2021-02-26T14:08:16.4869021Z 14:08:15.963 Downloading from http://localhost:8000/api/qualityprofiles/search?project=
2021-02-26T14:08:16.4886436Z 14:08:15.969 Fetching quality profile for project '
’ from http://localhost:8000/api/qualityprofiles/search?defaults=true
2021-02-26T14:08:16.4976144Z 14:08:15.97 Downloading from http://localhost:8000/api/qualityprofiles/search?defaults=true
2021-02-26T14:08:16.5007604Z 14:08:16.104 Fetching active rules for quality profile ‘AXekUCSPJAjXn7bRjhRL’ from http://localhost:8000/api/rules/search?f=repo,name,severity,lang,internalKey,templateKey,params,actives&ps=500&activation=true&qprofile=AXekUCSPJAjXn7bRjhRL&p=1
2021-02-26T14:08:16.5163825Z 14:08:16.105 Downloading from http://localhost:8000/api/rules/search?f=repo,name,severity,lang,internalKey,templateKey,params,actives&ps=500&activation=true&qprofile=AXekUCSPJAjXn7bRjhRL&p=1
2021-02-26T14:08:16.5168311Z 14:08:16.289 Fetching rules not active in quality profile ‘AXekUCSPJAjXn7bRjhRL’ for language ‘vbnet’ from http://localhost:8000/api/rules/search?f=repo,name,severity,lang,internalKey,templateKey,params&ps=500&activation=false&qprofile=AXekUCSPJAjXn7bRjhRL&p=1&languages=vbnet
2021-02-26T14:08:16.5468389Z 14:08:16.294 Downloading from http://localhost:8000/api/rules/search?f=repo,name,severity,lang,internalKey,templateKey,params&ps=500&activation=false&qprofile=AXekUCSPJAjXn7bRjhRL&p=1&languages=vbnet
2021-02-26T14:08:16.5498988Z 14:08:16.475 Local analyzer cache: C:\Windows\ServiceProfiles\NetworkService\AppData\Local\Temp.sonarqube\resources
2021-02-26T14:08:16.5629592Z 14:08:16.477 Writing Roslyn generated ruleset to C:\SonarAgent\vsts-agent-win-x64-2.181.2 (1)_work\1.sonarqube\conf\SonarQubeRoslyn-vbnet.ruleset…
2021-02-26T14:08:16.5640161Z 14:08:16.485 Writing Roslyn generated ruleset to C:\SonarAgent\vsts-agent-win-x64-2.181.2 (1)_work\1.sonarqube\conf\SonarQubeRoslyn-vbnet-test.ruleset…
2021-02-26T14:08:16.5720753Z 14:08:16.494 Provisioning analyzer assemblies for vbnet…
2021-02-26T14:08:16.5805802Z 14:08:16.495 Installing required Roslyn analyzers…
2021-02-26T14:08:16.5825930Z 14:08:16.495 Processing plugin: csharp version 8.15.0.24505
2021-02-26T14:08:16.5834943Z 14:08:16.496 Cache hit: using plugin files from C:\Windows\ServiceProfiles\NetworkService\AppData\Local\Temp.sonarqube\resources\0
2021-02-26T14:08:16.5877877Z 14:08:16.496 Processing plugin: vbnet version 8.15.0.24505
2021-02-26T14:08:16.5881922Z 14:08:16.496 Cache hit: using plugin files from C:\Windows\ServiceProfiles\NetworkService\AppData\Local\Temp.sonarqube\resources\1
2021-02-26T14:08:16.5883377Z 14:08:16.499 Writing Roslyn analyzer additional file to C:\SonarAgent\vsts-agent-win-x64-2.181.2 (1)_work\1.sonarqube\conf\vbnet\SonarLint.xml…
2021-02-26T14:08:16.5891915Z 14:08:16.555 Pre-processing succeeded.
2021-02-26T14:08:16.5893234Z ##[debug]Exit code 0 received from tool ‘C:\SonarAgent\vsts-agent-win-x64-2.181.2 (1)_work_tasks\SonarQubePrepare_15b84ca1-b62f-4a2a-a403-89b77a063157\4.17.0\classic-sonar-scanner-msbuild\SonarScanner.MSBuild.exe’
2021-02-26T14:08:16.5894461Z ##[debug]STDIO streams have closed for tool ‘C:\SonarAgent\vsts-agent-win-x64-2.181.2 (1)_work_tasks\SonarQubePrepare_Preformatted text15b84ca1-b62f-4a2a-a403-89b77a063157\4.17.0\classic-sonar-scanner-msbuild\SonarScanner.MSBuild.exe’
2021-02-26T14:08:16.5897625Z ##[section]Finishing: Prepare analysis on SonarQube

Hi,

Have you tested dotnet build instead of msbuild.exe to build your csproj-only project ?

Hi Caro,

I didnt tried dotnet build as of now,only msbuild i have tried.

Okay so whether build a .sln file (with your msbuild command), or you may have to switch to full .NET Core experience to be able to have your csproj built and analyzed.

Hi Caro,

I have builded my sample code msbuild without any issue.
please refer the screenshot below.

When i execute end step i am facing this issue

Ok so that’s not the same error as before. Which one are you trying to resolve please ? I’m getting confused. Thanks !

Hi Caro,
Here are 2 major cases i have tried from my end.

Case 1:
I am trying to fix the sonarscanner end step command like below.
SonarScanner.MSBuild.exe end
When i try to execute the above command i am facing the below issue.

Case 2:
I have tried with the new dotnet source code from the github for my requirement,where i can compile and build the code from msbuild as well.
As i can run the begin and end commands from the msbuild command prompt without any issue.
Please refer the screenshot after end statement

But after this analysis from end command,when i try to execute the pipeline from azure devops i am facing this issue with same .sln file.

Any Help on the above request!

Hi @vishnu_G

For case 1, have you check the error message ? You may have to check on your side of you have some exclusions / inclusions set to be sure that they do not overlap each other.

For case 2, you need to put the Prepare analysis configure task BEFORE the build solution, in order for the targets to be installed and detected in the subsequent build.

HTH,
Mickaël

Hi Caro,

For Case 1:
Please find the configuration file for sonar-scanner.properties file below.

sonar.host.url=http://localhost:8000
sonar.login=admin
sonar.password=*********
sonar.projectKey=SonarDemoProject
sonar.projectName=SonarDemoProject
sonar.projectVersion=8.6.1.40680
sonar.sources=C:/Users/VishnuPra (F3107DF5)/Downloads/DotnetProjects/SampleProject/Sample-ASP.NET-project-master

For Case 2:
please check the screen shot and the log below.

Log:
2021-03-12T09:25:39.7503876Z ##[section]Starting: Run Code Analysis
2021-03-12T09:26:03.5360236Z ==============================================================================
2021-03-12T09:26:03.5360556Z Task : Run Code Analysis
2021-03-12T09:26:03.5360828Z Description : Run scanner and upload the results to the SonarQube server.
2021-03-12T09:26:03.5361091Z Version : 4.18.0
2021-03-12T09:26:03.5361435Z Author : sonarsource
2021-03-12T09:26:03.5362147Z Help : Version: 4.18.0. This task is not needed for Maven and Gradle projects since the scanner should be run as part of the build.

More Information
2021-03-12T09:26:03.5362674Z ==============================================================================
2021-03-12T09:26:04.8673608Z [command]“C:\SonarAgent\vsts-agent-win-x64-2.181.2 (1)_work_tasks\SonarQubePrepare_15b84ca1-b62f-4a2a-a403-89b77a063157\4.18.0\classic-sonar-scanner-msbuild\SonarScanner.MSBuild.exe” end
2021-03-12T09:26:04.8678712Z SonarScanner for MSBuild 5.1
2021-03-12T09:26:04.8679294Z Using the .NET Framework version of the Scanner for MSBuild
2021-03-12T09:26:04.8679680Z Post-processing started.
2021-03-12T09:26:04.8680194Z 09:26:04.646 09:26:04.646 WARNING: The following projects do not have a valid ProjectGuid and were not built using a valid solution (.sln) thus will be skipped from analysis…
2021-03-12T09:26:04.8680921Z C:\SonarAgent\vsts-agent-win-x64-2.181.2 (1)_work\10\s\SocialGoal.Web.csproj
2021-03-12T09:26:04.8682105Z ##[error]09:26:04.694 No analysable projects were found. SonarQube analysis will not be performed. Check the build summary report for details.
2021-03-12T09:26:04.8784769Z 09:26:04.694 No analysable projects were found. SonarQube analysis will not be performed. Check the build summary report for details.
2021-03-12T09:26:04.8786099Z 09:26:04.695 Generation of the sonar-properties file failed. Unable to complete the analysis.
2021-03-12T09:26:04.8787903Z ##[error]09:26:04.718 Post-processing failed. Exit code: 1
2021-03-12T09:26:04.8846619Z 09:26:04.718 Post-processing failed. Exit code: 1
2021-03-12T09:26:04.8874688Z ##[error]The process ‘C:\SonarAgent\vsts-agent-win-x64-2.181.2 (1)_work_tasks\SonarQubePrepare_15b84ca1-b62f-4a2a-a403-89b77a063157\4.18.0\classic-sonar-scanner-msbuild\SonarScanner.MSBuild.exe’ failed with exit code 1
2021-03-12T09:26:04.8895826Z ##[section]Finishing: Run Code Analysis.

Note: there is now a separate thread dealing with Case 2. We won’t consider it further in this thread.

@vishnu_G can you confirm that “Case 1” is still a live issue that you need to resolve? Thanks.