简体   繁体   English

使用Sonar 4.5.4分析C#项目时出错

[英]Error analyzing c# project with Sonar 4.5.4

I got the following error when analyzing ac# project with SonarQube 4.5.4. 使用SonarQube 4.5.4分析ac#项目时,出现以下错误。 I have the sonar-csharp-plugin-4.0 installed. 我安装了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

The C# plugin is implemented in C# itself (based on Roslyn) since version 4.0. 从4.0版开始,C#插件在C#本身(基于Roslyn)中实现。

It requires the .NET framework 4.5 to be installed on the machine from which the analysis is being executed. 它要求在执行分析的计算机上安装.NET Framework 4.5。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM