使用msbuild和sonarqube构建我的csharp项目后,我遇到了这个错误。
D:\Jenkins\workspace\second-
project\.sonarqube\bin\targets\SonarQube.Integration.targets(201,5): error
MSB4018: The "IsTestFileByName" task failed unexpectedly.
[D:\Jenkins\workspace\second-project\source\Logger\Logger.csproj]
D:\Jenkins\workspace\second-
project\.sonarqube\bin\targets\SonarQube.Integration.targets(201,5): error
MSB4018: System.IO.FileNotFoundException: D:\Jenkins\workspace\second-
project\3rdparty\sonarqube\msbuild\SonarQube.Analysis.xml
[D:\Jenkins\workspace\second-project\source\Logger\Logger.csproj]
D:\Jenkins\workspace\second-
project\.sonarqube\bin\targets\SonarQube.Integration.targets(201,5): error
MSB4018: at SonarScanner.MSBuild.Common.Serializer.LoadModel[T](String
fileName) [D:\Jenkins\workspace\second-project\source\Logger\Logger.csproj]
D:\Jenkins\workspace\second-
project\.sonarqube\bin\targets\SonarQube.Integration.targets(201,5):
error MSB4018: at
SonarScanner.MSBuild.Common.AnalysisProperties.Load(String fileName)
[D:\Jenkins\workspace\second-project\source\Logger\Logger.csproj]
D:\Jenkins\workspace\second-
project\.sonarqube\bin\targets\SonarQube.Integration.targets(201,5): error
MSB4018: at
D:\Jenkins\workspace\second-
project\.sonarqube\bin\targets\SonarQube.Integration.targets(201,5): error
MSB4018: at SonarScanner.MSBuild.Tasks.IsTestFileByName.Execute()
[D:\Jenkins\workspace\second-project\source\Logger\Logger.csproj]
D:\Jenkins\workspace\second-
project\.sonarqube\bin\targets\SonarQube.Integration.targets(201,5): error
MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutio nHost.Execute() [D:\Jenkins\workspace\second-
project\source\Logger\Logger.csproj]
D:\Jenkins\workspace\second-
project\.sonarqube\bin\targets\SonarQube.Integration.targets(201,5): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext() [D:\Jenkins\workspace\second-project\source\Logger\Logger.csproj]
之前它运行时没有出现这样的错误。但是现在,我不知道为什么,这是这些错误。有什么帮助吗?
该解决方案可以在Visual Studio中很好地构建,而无需集成声纳。
P.S我曾尝试清洁和重建解决方案。
使用MSBuild 15.0版