Build is not successful when adding new task of SonaqQube , throwing error in build for .NetCore tas

HI All,
I have added the SonarQube task in my build for code analysis of .NetCore task and it is falling since then. However when I am disabling the SonarQubethan task its building without error.
The error I get is shared below:

Time Elapsed 00:00:04.04
2017-11-20T09:20:11.9948934Z ##[error]Error: C:\Program Files\dotnet\dotnet.exe failed with return code: 1
2017-11-20T09:20:11.9961930Z [command]"C:\Program Files\dotnet\dotnet.exe" build d:\a\1\s\Microsoft.Procurement.PurchaseOrderValidator\Microsoft.Procurement.Validators.Tests\Microsoft.Procurement.Validators.Tests.csproj /p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:DesktopBuildPackageLocation=d:\a\1\a\WebApp.zip /p:DeployIisAppPath=direct
2017-11-20T09:20:14.5701747Z Microsoft (R) Build Engine version 15.4.8.50001 for .NET Core
2017-11-20T09:20:14.5701747Z Copyright (C) Microsoft Corporation. All rights reserved.
2017-11-20T09:20:14.5701747Z
2017-11-20T09:20:17.8759397Z d:\a\1.sonarqube\bin\targets\SonarQube.Integration.targets(165,5): error MSB4062: The "IsTestFileByName" task could not be loaded from the assembly d:\a\1.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 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. [d:\a\1\s\Microsoft.Procurement.PurchaseOrderValidator\Microsoft.Procurement.PurchaseOrderValidator.Infrastructure\Microsoft.Procurement.PurchaseOrderValidator.Infrastructure.csproj]
2017-11-20T09:20:20.9121442Z
2017-11-20T09:20:20.9301436Z Build FAILED.
2017-11-20T09:20:20.9301436Z
2017-11-20T09:20:20.9321448Z d:\a\1.sonarqube\bin\targets\SonarQube.Integration.targets(165,5): error MSB4062: The "IsTestFileByName" task could not be loaded from the assembly d:\a\1.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 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. [d:\a\1\s\Microsoft.Procurement.PurchaseOrderValidator\Microsoft.Procurement.PurchaseOrderValidator.Infrastructure\Microsoft.Procurement.PurchaseOrderValidator.Infrastructure.csproj]
2017-11-20T09:20:20.9331460Z 0 Warning(s)
2017-11-20T09:20:20.9331460Z 1 Error(s)
2017-11-20T09:20:20.9331460Z

0 comments

Comment

Log in or Sign up to comment
Community showcase
Posted Oct 24, 2018 in Confluence

Atlassian Research opportunity with Confluence templates

Do you use templates with Confluence? Take part in a remote 1-hr workshop. You'll receive USD $100 for your time!   We're looking for people to participate in a   remote 1-hr workshop...

1,118 views 17 14
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you