Uploaded image for project: '[MOVED TO GITHUB] SonarQube Scanner for MSBuild'
  1. [MOVED TO GITHUB] SonarQube Scanner for MSBuild
  2. SONARMSBRU-141

The MSBuild.SonarQube.Runner does not work with the StyleCop Nuget Packages

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 1.0.1
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      For users who opt-in for installing StyleCop as NuGet packages (StyleCop.MSBuild), they end-up have an error that the StyleCop assembly cannot be found:

      INFO: ------------------------------------------------------------------------
      INFO: EXECUTION FAILURE
      INFO: ------------------------------------------------------------------------
      Total time: 6.402s
      Final Memory: 16M/115M
      INFO: ------------------------------------------------------------------------
      ERROR: Error during Sonar runner execution
      org.sonar.runner.impl.RunnerException: Unable to execute Sonar
      at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:91)
      at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75)
      at java.security.AccessController.doPrivileged(Native Method)
      at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69)
      at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50)
      at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102)
      at org.sonar.runner.api.Runner.execute(Runner.java:100)
      at org.sonar.runner.Main.executeTask(Main.java:70)
      at org.sonar.runner.Main.execute(Main.java:59)
      at org.sonar.runner.Main.main(Main.java:53)
      Caused by: java.lang.IllegalArgumentException: Cannot find the file "C:\Program Files (x86)\StyleCop 4.7\StyleCop.dll" provided by the property "sonar.stylecop.styleCopDllPath".
      at org.sonar.plugins.stylecop.StyleCopConfiguration.checkFileExists(StyleCopConfiguration.java:82)
      at org.sonar.plugins.stylecop.StyleCopConfiguration.styleCopDllPath(StyleCopConfiguration.java:74)
      at org.sonar.plugins.stylecop.StyleCopSensor.analyse(StyleCopSensor.java:101)
      at org.sonar.plugins.stylecop.StyleCopSensor.analyse(StyleCopSensor.java:85)
      at org.sonar.batch.phases.SensorsExecutor.executeSensor(SensorsExecutor.java:59)
      at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:51)
      at org.sonar.batch.phases.DatabaseModePhaseExecutor.execute(DatabaseModePhaseExecutor.java:120)
      at org.sonar.batch.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:264)
      at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92)
      at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
      at org.sonar.batch.scan.ProjectScanContainer.scan(ProjectScanContainer.java:235)
      at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:230)
      at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:228)
      at org.sonar.batch.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:220)
      at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92)
      at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
      at org.sonar.batch.scan.ScanTask.scan(ScanTask.java:57)
      at org.sonar.batch.scan.ScanTask.execute(ScanTask.java:45)
      at org.sonar.batch.bootstrap.TaskContainer.doAfterStart(TaskContainer.java:135)
      at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92)
      at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
      at org.sonar.batch.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:158)
      at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:95)
      at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:67)
      at org.sonar.runner.batch.IsolatedLauncher.execute(IsolatedLauncher.java:48)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:87)
      ... 9 more
      ERROR:
      ERROR: Re-run SonarQube Runner using the -X switch to enable full debug logging

        Attachments

          Activity

            People

            • Assignee:
              jmprieur Jean-Marc Prieur MSFT
              Reporter:
              jmprieur Jean-Marc Prieur MSFT
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: