Я обновил SonarQube от 3.2.1 до SonarQube 4.2. Также я обновил плагин C# с 1.4 до 3.3. Мы используем Sonar runner 2.0. Кроме того, мы установили Analysis Bootstrapper для Visual Studio в TRUE.Должно быть установлено свойство «sonar.cs.fxcop.assembly»
После обновления я столкнулся ошибку ниже в большинстве сборок:
Однако, мы получаем следующую ошибку
"Exception in thread "main" org.sonar.runner.RunnerException: java.lang.IllegalArgumentException: The property "sonar.cs.fxcop.assembly" must be set and the project must have been built to execute FxCop rules. This property can be automatically set by the Analysis Bootstrapper for Visual Studio Projects plugin, see: http://docs.codehaus.org/x/TAA1Dg.If you wish to skip the analysis of not built projects, set the property "sonar.visualstudio.skipIfNotBuilt".
Мы добавили sonar.visualstudio.enable = верно, а также сонар. cs.fxcop.assembly в файл sonar.properties.
Также мы установили путь fxcopcmd.exe в sonar-project.properties, в sonar-runner.properties и в sonarqube под плагином C#.
отредактирован:
Exception in thread "main" org.sonar.runner.RunnerException: java.lang.IllegalArgumentException: The property "sonar.cs.fxcop.assembly" must be set and the project must have been built to execute FxCop rules. This property can be automatically set by the Analysis Bootstrapper for Visual Studio Projects plugin, see: http://docs.codehaus.org/x/TAA1Dg.If you wish to skip the analysis of not built projects, set the property "sonar.visualstudio.skipIfNotBuilt".
○at org.sonar.runner.Runner.delegateExecution(Runner.java:288)
○at org.sonar.runner.Runner.execute(Runner.java:151)
○at org.sonar.runner.Main.execute(Main.java:84)
○at org.sonar.runner.Main.main(Main.java:56)
Caused by: java.lang.IllegalArgumentException: The property "sonar.cs.fxcop.assembly" must be set and the project must have been built to execute FxCop rules. This property can be automatically set by the Analysis Bootstrapper for Visual Studio Projects plugin, see: http://docs.codehaus.org/x/TAA1Dg.If you wish to skip the analysis of not built projects, set the property "sonar.visualstudio.skipIfNotBuilt".
○at org.sonar.plugins.fxcop.FxCopConfiguration.checkMandatoryProperties(FxCopConfiguration.java:94)
○at org.sonar.plugins.fxcop.FxCopConfiguration.checkProperties(FxCopConfiguration.java:86)
○at org.sonar.plugins.fxcop.FxCopSensor.analyse(FxCopSensor.java:91)
○at org.sonar.plugins.fxcop.FxCopSensor.analyse(FxCopSensor.java:86)
○at org.sonar.batch.phases.SensorsExecutor.executeSensor(SensorsExecutor.java:79)
○at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:70)
○at org.sonar.batch.phases.PhaseExecutor.execute(PhaseExecutor.java:134)
○at org.sonar.batch.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:186)
○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:199)
○at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:194)
○at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:192)
○at org.sonar.batch.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:187)
○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:56)
○at org.sonar.batch.scan.ScanTask.execute(ScanTask.java:44)
○at org.sonar.batch.bootstrap.TaskContainer.doAfterStart(TaskContainer.java:82)
○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.BootstrapContainer.executeTask(BootstrapContainer.java:144)
○at org.sonar.batch.bootstrap.BootstrapContainer.doAfterStart(BootstrapContainer.java:132)
○at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92)
○at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
○at org.sonar.batch.bootstrapper.Batch.startBatch(Batch.java:92)
○at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:74)
○at org.sonar.batch.Batch.execute(Batch.java:103)
Заранее спасибо
Какую версию VS вы используете? –
мы используем VS-2013 – sai