我正在嘗試使用針對dotnetcore解決方案的SonarQube任務,但解決方案內有一些使用dotnetstandard框架的項目。所以,試圖對代碼進行分析的時候,新的SonarQube任務拋出一個錯誤,指出它無法找到Microsoft.Build.Utilities.v4.0,如下圖所示:SonarQube VSTS Task 3.0.1是否無法支持多種msbuild類型?
2017-07-26T20:33:04.5685747Z
[C:\agent\_work\6\.sonarqube\bin\targets\SonarQube.Integration.targets(166,5): error MSB4062: The "IsTestFileByName" task could not be loaded from the assembly C:\agent\_work\6\.sonarqube\bin\SonarQube.Integration.Tasks.dll. Could not load file or assembly 'Microsoft.Build.Utilities.v4.0, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified. Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask.
[C:\agent\_work\6\s\PSG.Identity.Contracts\PSG.Identity.Contracts.csproj]
2017-07-26T20:33: 05.1623435Z ## [錯誤]錯誤:C:\ Program Files \ dotnet \ dotnet.exe失敗,返回代碼:1
IntegrationTest項目寫在dotnetcore框架上,但該項目引用了2個項目,這些項目都是用dotnetstandard框架。是否有可能讓這個任務支持多個框架?
也看看[這](https://github.com/GitTools/GitVersion/issues/1175)的討論。 –