使用SonarQube 4.5.4分析c#项目时出现以下错误。我安装了sonar-csharp-plugin-4.0。
Sensor org.sonar.plugins.csharp.CSharpSensor@18cf794...
10:48:17.000 DEBUG - Updating semaphore batch-com.test.sample
10:48:24.571 ERROR -
10:48:24.879 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.
10:48:24.879 ERROR - at SonarQube.CSharp.CodeAnalysis.Runner.Program.Main(String[] args)
10:48:27.146 DEBUG - Updating semaphore batch-com.test.sample
10:48:37.211 DEBUG - Updating semaphore batch-com.test.sample
10:48:37.714 DEBUG - Release semaphore on project : org.sonar.api.resources.Project@494546[id=1442,key=com.test.sample,qualifier=TRK], with key batch-com.test.sample
答案 0 :(得分:0)
从版本4.0开始,C#插件在C#本身(基于Roslyn)中实现。
它需要在执行分析的机器上安装.NET framework 4.5。