VSTS SonarQube version?

vsts

(Gavin Stevens) #1

Running a aspnetcore1.1 build in VSTS with 1.* Task extensions… Build fails with:

2018-07-05T20:54:36.1732582Z ##[section]Starting: Build
2018-07-05T20:54:36.1737455Z 
2018-07-05T20:54:36.1737788Z Task         : .NET Core
2018-07-05T20:54:36.1737980Z Description  : Build, test and publish using dotnet core command-line.
2018-07-05T20:54:36.1738175Z Version      : 1.0.2
2018-07-05T20:54:36.1738332Z Author       : Microsoft Corporation
2018-07-05T20:54:36.1738539Z Help         : [More Information](https://go.microsoft.com/fwlink/?linkid=832194)
2018-07-05T20:54:36.1738751Z 2018-07-05T20:54:36.7938740Z [command]"C:\Program Files\dotnet\dotnet.exe" build D:\a\1\s\BlobStorageRepository\TemplateRepository.csproj --configuration dev2
2018-07-05T20:54:36.9710766Z Microsoft (R) Build Engine version 15.3.409.57025 for .NET Core
2018-07-05T20:54:36.9716234Z Copyright (C) Microsoft Corporation. All rights reserved.
2018-07-05T20:54:36.9716568Z 
2018-07-05T20:54:39.5923173Z D:\a\1\.sonarqube\bin\targets\SonarQube.Integration.targets(201,5): error MSB4018: The "IsTestFileByName" task failed unexpectedly. [D:\a\1\s\BlobStorageRepository\TemplateRepository.csproj]
2018-07-05T20:54:39.5926156Z D:\a\1\.sonarqube\bin\targets\SonarQube.Integration.targets(201,5): error MSB4018: System.IO.FileNotFoundException: Could not load file or assembly 'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. The system cannot find the file specified. [D:\a\1\s\BlobStorageRepository\TemplateRepository.csproj]
2018-07-05T20:54:39.5926778Z D:\a\1\.sonarqube\bin\targets\SonarQube.Integration.targets(201,5): error MSB4018: File name: 'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' [D:\a\1\s\BlobStorageRepository\TemplateRepository.csproj]
2018-07-05T20:54:39.5927338Z D:\a\1\.sonarqube\bin\targets\SonarQube.Integration.targets(201,5): error MSB4018:    at SonarScanner.MSBuild.Tasks.IsTestFileByName.Execute() [D:\a\1\s\BlobStorageRepository\TemplateRepository.csproj]
2018-07-05T20:54:39.5927913Z D:\a\1\.sonarqube\bin\targets\SonarQube.Integration.targets(201,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [D:\a\1\s\BlobStorageRepository\TemplateRepository.csproj]
2018-07-05T20:54:39.5928455Z D:\a\1\.sonarqube\bin\targets\SonarQube.Integration.targets(201,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__25.MoveNext() [D:\a\1\s\BlobStorageRepository\TemplateRepository.csproj]

It seems related to the version of MSbuild 15.3 being used here.
Do I need to update the SonarCube VSTS extension?

I can’t tell what version is installed… Trying to use the VS2017 Hosted Build agent.

I set things up on a fresh server and it’s using MSBuild 15.7… Is this related to the VSTS Extension version? I can see in the latest MSBuild tools, you’ve updated the custom build task to reference .netstandard Instead of System 4.0.0.0. So how do I get this version on my Hosted 2017 build agent?

Gavin


(Gavin Stevens) #2

This seems like a pretty easy one… Anyone ?


(Colin Mueller) #3

Gavin,

Does your build work if you exclude the SonarQube tasks?

Colin


(Gavin Stevens) #4

Yes, its obviously the SonarQube custom Build Task that is throwing an exception.