sonarqube - 构建配置为运行 SonarQube 分析,但无法找到 SonarQube 分析目标
问题描述
我是 .Net 的新手,也是使用 MS Build 的 SonarScanner 的新手。我期待您的帮助,以解决我在 sonarscanner-msbuild begin process 之后构建项目时遇到的错误。
C:\Windows\system32\config\systemprofile\AppData\Local\Microsoft\MSBuild\14.0\Microsoft.Common.targets\ImportBefore\SonarQube.Integration.ImportBefore.targets(62,5): error : The build is configured to run SonarQube analysis but the SonarQube analysis targets could not be located. Project: XYZ.csproj [E:\jenkins\workspace\XYZ\XYZ.csproj]
解决方案
提示和线索:
- 确保
SonarScanner.MsBuild begin
在执行之前已经运行MsBuild
MsBuild
使用switch运行/v:diagnostic
以获取详细的故障排除日志。在日志查找SonarQubeTargetsPath
和SonarQubeTargetFilePath
值中。- 如果遇到这种或其他配置困难,请参阅我关于如何在 .NET 生态系统中设置 SonarQube 的教程:https ://blog.pragmasoft.pl/software/2018-10-10-sonarqube-2-setup-environment/
推荐阅读
- javascript - 如何使用 react-big-calendar 的 onSelectSlot 方法在多天创建事件?
- ajax - 从 bean(primefaces)控制 onClick 或 onSucess 事件?
- ms-access - 我从拆分表中删除了一个字段,现在我在前端看不到连续表单
- python - 如何在不迭代查询集的情况下将 Django QuerySet 转换为包含对象列表的字典?
- python - 在 PyPDF PdfFileReader 中循环浏览页面范围会产生奇怪的循环
- php - 在 PHP 7.4 异常的源代码中包含 __wakeup 有什么意义?
- javascript - 在反应应用程序中更改数组中日期字段的格式
- reactjs - Material-UI 4.1.2 样式选择 SelectInput
- amazon-web-services - 如何与外部用户共享公共 S3 存储桶?
- javascript - 复选框处于活动状态时重复功能