我想对msbuild proj文件运行SonarQube分析。 该版本包含一个.proj文件。此文件将生成其他几个.proj文件。 当我运行构建时,SonarQube打印此错误消息:
The SonarQube MSBuild integration failed: SonarQube was unable to collect the required information about your projects.
Possible causes:
1. The project has not been built - the project must be built in between the begin and end steps
2. An unsupported version of MSBuild has been used to build the project. Currently MSBuild 14.0 and 15.0 are supported
3. The begin, build and end steps have not all been launched from the same folder
4. None of the analyzed projects have a valid ProjectGuid and you have not used a solution (.sln)
我检查了一下,最后一点可能是问题所在。没有.sln,但是每个被调用的.proj文件都添加了Guid,但没有添加。 (它以前可以与带有guid的.njsproj文件配合使用)
Project Guid是这样提供的:
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="15.0" DefaultTargets="Build">
<PropertyGroup>
<ProjectGuid>{B1E36758-8A06-4793-A7D2-216DE578732D}</ProjectGuid>
</PropertyGroup>
....
</Project>
我也试过没有大括号。
我不太确定sonarqube会期待什么。 SonarQube是否可以处理.proj文件?