如何将sonar-project.properties注入sonarqube中的msbuild

如何将sonar-project.properties注入sonarqube中的msbuild,msbuild,sonarqube,sonarqube-scan,Msbuild,Sonarqube,Sonarqube Scan,我有一个c-sharp解决方案(比如sample.sln),但要运行sonarqube分析,根据文档,我运行了以下命令: ".\3rdparty\sonarqube\msbuild\SonarScanner.MSBuild.exe" begin /k:"comm" /n:"comm" /v:"2.0" /d:sonar.cs.dotcover.reportsPaths= "D:\Jenkins\workspace\comm\TEST\CoverageReport.html"

我有一个c-sharp解决方案(比如sample.sln),但要运行sonarqube分析,根据文档,我运行了以下命令:

".\3rdparty\sonarqube\msbuild\SonarScanner.MSBuild.exe" begin /k:"comm" 
  /n:"comm" /v:"2.0" 
  /d:sonar.cs.dotcover.reportsPaths= 
  "D:\Jenkins\workspace\comm\TEST\CoverageReport.html" 
  /d:sonar.host.url="http://101.149.24.128"
  /d:sonar.sources="D:\Jenkins\workspace\comm\source\*.cs"

  msbuild comm.sln /t:Rebuild

  ".\3rdparty\sonarqube\msbuild\SonarScanner.MSBuild.exe" end
但是得到这个错误:

SONAR_SCANNER_OPTS is not configured. Setting it to the default value of -Xmx1024m
Calling the SonarQube Scanner...
INFO: Scanner configuration file: D:\Jenkins\workspace\comm\3rdparty\sonarqube\msbuild\sonar-scanner-3.2.0.1227\bin\..\conf\sonar-scanner.properties
INFO: Project root configuration file: D:\Jenkins\workspace\comm\.sonarqube\out\sonar-project.properties
INFO: SonarQube Scanner 3.2.0.1227
INFO: Java 1.8.0_151 Oracle Corporation (64-bit)
INFO: Windows Server 2016 10.0 amd64
INFO: SONAR_SCANNER_OPTS=-Xmx1024m
INFO: User cache: C:\Users\jenkins\.sonar\cache
INFO: SonarQube server 6.7.5
INFO: Default locale: "en_US", source code encoding: "windows-1252" (analysis is platform dependent)
INFO: Publish mode
INFO: Load global settings
INFO: Load global settings (done) | time=278ms
INFO: Server id: 7950B4AD-AWYRoMpRpurWib7aM-qP
INFO: User cache: C:\Users\jenkins\.sonar\cache
INFO: Load plugins index
INFO: Load plugins index (done) | time=84ms
INFO: Process project properties
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 13.565s
INFO: Final Memory: 6M/84M
INFO: ------------------------------------------------------------------------
ERROR: Error during SonarQube Scanner execution
ERROR: Unable to load component class org.sonar.scanner.scan.ProjectLock
ERROR: Caused by: Unable to load component class org.sonar.scanner.scan.DefaultInputModuleHierarchy
ERROR: Caused by: Unable to load component class org.sonar.scanner.scan.ProjectBuildersExecutor
ERROR: Caused by: Unable to load component class com.talanlabs.sonar.plugins.gitlab.CommitProjectBuilder
ERROR: Caused by: Unable to load component class com.talanlabs.sonar.plugins.gitlab.GitLabPluginConfiguration
ERROR: Caused by: Unable to load component class org.sonar.scanner.scan.MutableProjectSettings
ERROR: Caused by: Unable to load component class org.sonar.api.batch.bootstrap.ProjectReactor
**ERROR: Caused by: Illegal char <*> at index 43: D:\Jenkins\workspace\comm\source\*.cs**
ERROR: 
The SonarQube Scanner did not complete successfully

从这篇文章中我可以推断,我们无法为msbuild设置sonar-project.properties?是吗

那么,如何在声纳分析中包含/排除代码覆盖范围内的文件/文件夹呢?我没有管理员权限,无法设置管理全局排除

有什么帮助吗

使用sonarqube LTS 6.7.6的p.S

sonar-project.properties files are not understood by the SonarScanner for MSBuild. Remove those files from the following folders: D:\Jenkins\workspace\comm