Azure DevOps Server 2020 Update 1.1
SonarQube Extension version 4.23.1
SonarScanner for MSBuild version 5.3.1
SonarQube.Integration.targets fails at line 418 with the following error log:
61>RazorCoreCompile:
CompilerServer: server - server processed compilation - 3686d2c2-a462-4e2f-921c-ae4f43f83712
58>SonarWriteFilesToAnalyze:
Sonar: (Enscape.Localization.csproj) Number of files to analyse: 104. The list of files to be analyzed is in C:\tfs\Agent\_work\3\.sonarqube\conf\225\FilesToAnalyze.txt.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.Directory.InternalMove(String sourceDirName, String destDirName, Boolean checkHost)
at SonarScanner.MSBuild.Tasks.MoveDirectory.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()
61>C:\tfs\Agent\_work\3\.sonarqube\bin\targets\SonarQube.Integration.targets(418,5): error MSB4018: The "MoveDirectory" task failed unexpectedly. [C:\tfs\Agent\_work\3\s\Source\WebServices\Template\Enscape.Template\Enscape.Template.csproj]
C:\tfs\Agent\_work\3\.sonarqube\bin\targets\SonarQube.Integration.targets(418,5): error MSB4018: System.IO.IOException: Cannot create a file when that file already exists. [C:\tfs\Agent\_work\3\s\Source\WebServices\Template\Enscape.Template\Enscape.Template.csproj]
C:\tfs\Agent\_work\3\.sonarqube\bin\targets\SonarQube.Integration.targets(418,5): error MSB4018: [C:\tfs\Agent\_work\3\s\Source\WebServices\Template\Enscape.Template\Enscape.Template.csproj]
C:\tfs\Agent\_work\3\.sonarqube\bin\targets\SonarQube.Integration.targets(418,5): error MSB4018: at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) [C:\tfs\Agent\_work\3\s\Source\WebServices\Template\Enscape.Template\Enscape.Template.csproj]
C:\tfs\Agent\_work\3\.sonarqube\bin\targets\SonarQube.Integration.targets(418,5): error MSB4018: at System.IO.Directory.InternalMove(String sourceDirName, String destDirName, Boolean checkHost) [C:\tfs\Agent\_work\3\s\Source\WebServices\Template\Enscape.Template\Enscape.Template.csproj]
C:\tfs\Agent\_work\3\.sonarqube\bin\targets\SonarQube.Integration.targets(418,5): error MSB4018: at SonarScanner.MSBuild.Tasks.MoveDirectory.Execute() [C:\tfs\Agent\_work\3\s\Source\WebServices\Template\Enscape.Template\Enscape.Template.csproj]
C:\tfs\Agent\_work\3\.sonarqube\bin\targets\SonarQube.Integration.targets(418,5): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [C:\tfs\Agent\_work\3\s\Source\WebServices\Template\Enscape.Template\Enscape.Template.csproj]
C:\tfs\Agent\_work\3\.sonarqube\bin\targets\SonarQube.Integration.targets(418,5): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext() [C:\tfs\Agent\_work\3\s\Source\WebServices\Template\Enscape.Template\Enscape.Template.csproj]
61>Done Building Project "C:\tfs\Agent\_work\3\s\Source\WebServices\Template\Enscape.Template\Enscape.Template.csproj" (default targets) -- FAILED.
This fails unreliably on different machines (build agents) every once in a while.