For all .NET Framework and .NET Core projects in our TFS server 2018 the sonar scan does not finish scan after updatet to version 3.1.0.
We have the following build configuration in TFS server 2018, for a .NET Framework project: Build configuration
The build breaks on the complete analyse step with the following error:
2018-01-16T09:28:19.5905262Z ##[error]No analysable projects were found. SonarQube analysis will not be performed. Check the build summary report for details. 2018-01-16T09:28:19.5905262Z Generation of the sonar-properties file failed. Unable to complete SonarQube analysis. 2018-01-16T09:28:19.5905262Z 10:28:19.543 Creating a summary markdown file... 2018-01-16T09:28:19.5905262Z
[error]10:28:19.543 Post-processing failed. Exit code: 1 2018-01-16T09:28:19.5905262Z ##[error]System.Exception: Unexpected
exit code received from batch file: 1 2018-01-16T09:28:19.5905262Z
[debug]Processed: ##vso[task.logissue type=error;]System.Exception: Unexpected exit code received from batch file: 1
2018-01-16T09:28:19.5905262Z at Microsoft.TeamFoundation.DistributedTask.Task.Internal.InvokeBatchScriptCmdlet.ProcessRecord() 2018-01-16T09:28:19.5905262Z at System.Management.Automation.CommandProcessor.ProcessRecord() 2018-01-16T09:28:19.5905262Z ##[debug]The build was not triggered by a Pull Request, not processing code analysis comments 2018-01-16T09:28:19.5905262Z ##[debug]Invoke - Get-TaskVariable cmdlet 2018-01-16T09:28:19.5905262Z ##[debug]Variable read: MSBuild.SonarQube.Internal.IncludeFullReport = true 2018-01-16T09:28:19.6061603Z ##[debug]Invoke - Get-TaskVariable cmdlet 2018-01-16T09:28:19.6061603Z ##[debug]Variable read: MSBuild.SonarQube.Internal.ServerVersion = 2018-01-16T09:28:19.6217771Z ##[debug]Calling InvokeGetRestMethod "/api/server/version" 2018-01-16T09:28:19.6374047Z ##[debug]Invoke - Get-TaskVariable cmdlet 2018-01-16T09:28:19.6374047Z ##[debug]Variable read: MSBuild.SonarQube.HostUrl = https://sonar.MyOrganisation.nl/ 2018-01-16T09:28:19.6530505Z ##[debug]Invoke - Get-TaskVariable cmdlet 2018-01-16T09:28:19.6530505Z ##[debug]Variable read: MSBuild.SonarQube.ServerUsername = ******** 2018-01-16T09:28:19.6530505Z ##[debug]Invoke - Get-TaskVariable cmdlet 2018-01-16T09:28:19.6530505Z ##[debug]Variable read: MSBuild.SonarQube.ServerPassword = 2018-01-16T09:28:19.6842912Z
[debug]GET https://sonar.MyOrganisation.nl/api/server/version with 0-byte payload 2018-01-16T09:28:19.7155095Z ##[debug]received 11-byte
response of content type text/plain; charset=UTF-8 2018-01-16T09:28:19.7323972Z ##[debug]Processed:
vso[task.setvariable variable=MSBuild.SonarQube.Internal.ServerVersion;]6.7.1.35068
2018-01-16T09:28:19.7323972Z 2018-01-16T09:28:19.7323972Z 2018-01-16T09:28:19.7323972Z ##[debug]The SonarQube server version is 6.7.1.35068 2018-01-16T09:28:19.7467772Z Waiting on the SonarQube server to finish processing in order to determine the quality gate status. 2018-01-16T09:28:19.7467772Z 2018-01-16T09:28:19.7467772Z 2018-01-16T09:28:19.7467772Z ##[debug]Invoke - Get-TaskVariable cmdlet 2018-01-16T09:28:19.7467772Z ##[debug]Variable read: Agent.BuildDirectory = d:/_work\3 2018-01-16T09:28:19.7624290Z
[debug]Could not find the task details file at d:/_work\3.sonarqube\out.sonar\report-task.txt
2018-01-16T09:28:19.7936587Z
[error]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 2018-01-16T09:28:19.7936587Z ##[debug]Processed: ##vso[task.logissue type=error;]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 2018-01-16T09:28:19.7936587Z --- End of inner exception stack trace --- 2018-01-16T09:28:19.7936587Z at System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input) 2018-01-16T09:28:19.7936587Z at System.Management.Automation.PowerShell.Worker.ConstructPipelineAndDoWork(Runspace rs, Boolean performSyncInvoke) 2018-01-16T09:28:19.7936587Z at System.Management.Automation.PowerShell.Worker.CreateRunspaceIfNeededAndDoWork(Runspace rsToUse, Boolean isSync) 2018-01-16T09:28:19.7936587Z at System.Management.Automation.PowerShell.CoreInvokeHelper[TInput,TOutput](PSDataCollection
1 input, PSDataCollection
1 output, PSInvocationSettings settings) 2018-01-16T09:28:19.7936587Z at System.Management.Automation.PowerShell.CoreInvoke[TInput,TOutput](PSDataCollection1 input, PSDataCollection
1 output, PSInvocationSettings settings) 2018-01-16T09:28:19.7936587Z at Microsoft.TeamFoundation.DistributedTask.Handlers.LegacyVSTSPowerShellHost.VSTSPowerShellHost.Main(String[] args) 2018-01-16T09:28:19.8092817Z[error]LegacyVSTSPowerShellHost.exe completed with return code: -1. 2018-01-16T09:28:19.8092817Z ##[section]Finishing: Complete the
SonarQube analysis
I have checked the build log in debug mode, but i can't see anything wrong.
Temp location with the full log with debug mode: https://onedrive.live.com/?authkey=%21ADdDbeYD4oxJ9NA&id=5A1F84872B7BA3C1%21952&cid=5A1F84872B7BA3C1
Note that i have replaced my organisation name with: myorganiation and the project name with MyProject in the log.