问题
I am trying to configure my visual studio project to send some analysis data to SonarQube server using TFS 2015 build (vnext) I get this error in the Sonar end task. ##[error]No ProjectInfo.xml files were found. Possible causes: ##[error]1. The project has not been built - the end step was called right after the begin step, without a build step in between An unsupported version of MSBuild has been used to build the project. Currently MSBuild 12.0 upwards are supported
We use MSBuild 14.0 in the server.
回答1:
The SonarQube Scanner for MSBuild requires your project to be built with MSBuild 14.0. We recommend installing Visual Studio 2015 on the analysis machine in order to benefit from the integration and features provided with the Visual Studio ecosystem (VSTest, MSTest unit tests, etc.).
Suggest you to also install VS2015 on your build server, and since you are using MSbuild 14.0, double check if you are using the old task with deprecated in front which used for MSbuild 12.0. SonarQube Scanner for MSBuild released with static analysis which could executed during the build on MSbuild 14.0.
The support of MSBuild 12 by the SonarQube Scanner for MSBuild is deprecated and will be removed in a future release.
Source: Compatibility with Visual Studio and MSBuild
Please download and use the latest version of the SonarQube Scanner for MSBuild in marketplace and try again. The recent documentation is available from Analyzing with SonarQube Extension for VSTS/TFS, you could also take a look at this tutorial.
来源:https://stackoverflow.com/questions/42812107/no-projectinfo-xml-files-were-found-tfs-build-with-sonar-end-task