2015-06-23 73 views
1

當我嘗試分析未安裝Visual Studio的機器上的.Net/C#項目時,SonarQube亞軍拋出org.sonar.runner.impl.RunnerException。SonarQube亞軍拋出org.sonar.runner.impl.RunnerException

這裏是日誌片段:

[21:51:53][Step 2/2] 16:21:53.582 INFO - Sensor [email protected] 
[21:51:53][Step 2/2] 16:21:53.764 ERROR - 
[21:51:53][Step 2/2] 16:21:53.767 ERROR - Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. 
[21:51:53][Step 2/2] 16:21:53.767 ERROR - at SonarQube.CSharp.CodeAnalysis.Runner.Program.Main(String[] args) 
[21:51:55][Step 2/2] INFO: ------------------------------------------------------------------------ 
[21:51:55][Step 2/2] INFO: EXECUTION FAILURE 
[21:51:55][Step 2/2] INFO: ------------------------------------------------------------------------ 
[21:51:55][Step 2/2] Total time: 9.837s 
[21:51:55][Step 2/2] ERROR: Error during Sonar runner execution 
[21:51:55][Step 2/2] Final Memory: 23M/637M 
[21:51:55][Step 2/2] INFO: ------------------------------------------------------------------------ 
[21:51:55][Step 2/2] ERROR: Unable to execute Sonar 
[21:51:55][Step 2/2] ERROR: Caused by: The .NET analyzer failed with exit code: 255 
[21:51:55][Step 2/2] ERROR: 
[21:51:55][Step 2/2] ERROR: To see the full stack trace of the errors, re-run SonarQube Runner with the -e switch. 
[21:51:55][Step 2/2] ERROR: Re-run SonarQube Runner using the -X switch to enable full debug logging. 
[21:51:55][Step 2/2] Process exited with code 1 

輸出運行聲納亞軍-e

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.IllegalStateException: The .NET analyzer failed with exit code: -532462766 
     at org.sonar.plugins.csharp.CSharpSensor.analyze(CSharpSensor.java:160) 
     at org.sonar.plugins.csharp.CSharpSensor.analyse(CSharpSensor.java:102) 
     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(NativeMethodAccessorImpl.java:62) 
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
     at java.lang.reflect.Method.invoke(Method.java:497) 
     at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:87) 

分析C#代碼是需要的Visual Studio是什麼時候?

回答