1
votes

On this test machine I have installed:

  • VS17 Enterprise
  • TFS17.1
  • SonarQube 6.3
  • SonarQube Scanner for MSBuild 2.2
  • Msbuild /version

Microsoft (R) Build Engine version 15.1.548.43366 Copyright (C) Microsoft Corporation. All rights reserved.

But I'm getting this error on "Complete the SonarQube analysis":

The SonarQube MSBuild integration failed: SonarQube was unable to collect the required information about your projects.
Possible causes:

1. The project has not been built - the project must be built in between the begin and end steps

2. An unsupported version of MSBuild has been used to build the project. Currently MSBuild 12.0 upwards are supported

3. The begin, build or end steps have not all been launched from the same folder

System.Management.Automation.RuntimeException: Cannot determine if the analysis has finished. Possible cause: your SonarQube server version is lower than 5.3 - for more details see https://go.microsoft.com/fwlink/?LinkId=722407 ---> System.Management.Automation.RuntimeException: Cannot determine if the analysis has finished. Possible cause: your SonarQube server version is lower than 5.3 - for more details see https://go.microsoft.com/fwlink/?LinkId=722407

--- End of inner exception stack trace ---

    at System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input)

    at System.Management.Automation.PowerShell.Worker.ConstructPipelineAndDoWork(Runspace rs, Boolean performSyncInvoke)

    at System.Management.Automation.PowerShell.Worker.CreateRunspaceIfNeededAndDoWork(Runspace rsToUse, Boolean isSync)

    at System.Management.Automation.PowerShell.CoreInvokeHelper[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)

    at System.Management.Automation.PowerShell.CoreInvoke[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)

    at Microsoft.TeamFoundation.DistributedTask.Handlers.LegacyVSTSPowerShellHost.VSTSPowerShellHost.Main(String[] args)

 ##[error]LegacyVSTSPowerShellHost.exe completed with return code: -1.
1
Can you share the detail log here?starian chen-MSFT

1 Answers

5
votes

MSBuild 15 is currently not supported by the SonarQube Scanner for MSBuild.

We are working on this bug (SONARMSBRU-288), and a compatible version will soon be released to address this issue.