2

我正在尝试使用 sonarqube 分析 ac# 项目,但我不断收到错误消息,说 sonarlint 不是有效的 win32 应用程序,这是什么原因?

[15:51:01]: [Step 1/3] 15:51:01.807 INFO  - Sensor FileHashSensor...
[15:51:01]: [Step 1/3] 15:51:01.838 INFO  - Sensor FileHashSensor done: 31 ms
[15:51:01]: [Step 1/3] 15:51:01.838 INFO  - Sensor org.sonar.plugins.csharp.CSharpSensor@375465a1...
[15:51:02]: [Step 1/3] INFO: ------------------------------------------------------------------------
[15:51:02]: [Step 1/3] INFO: EXECUTION FAILURE
[15:51:02]: [Step 1/3] INFO: ------------------------------------------------------------------------
[15:51:02]: [Step 1/3] Total time: 26.359s
[15:51:02]: [Step 1/3] Final Memory: 53M/1397M
[15:51:02]: [Step 1/3] ERROR: Error during Sonar runner execution
[15:51:02]: [Step 1/3] INFO: ------------------------------------------------------------------------
[15:51:02]: [Step 1/3] ERROR: Unable to execute Sonar
[15:51:02]: [Step 1/3] ERROR: Caused by: java.io.IOException: Cannot run program "X:\xxxx\xxxx\xxxx\xxxxxx\.\.sonar\SonarLint.Runner\SonarLint.Runner.exe": CreateProcess error=193, %1 is not a valid Win32 application
[15:51:02]: [Step 1/3] ERROR: Caused by: Cannot run program "X:\xxxx\xxxx\xxxxx\xxxxx\.\.sonar\SonarLint.Runner\SonarLint.Runner.exe": CreateProcess error=193, %1 is not a valid Win32 application
[15:51:02]: [Step 1/3] ERROR: Caused by: CreateProcess error=193, %1 is not a valid Win32 application
4

2 回答 2

0

使用不依赖/使用 sonarlint 的 c# 插件版本,我使用的是 3.3,问题是它是旧版本,所以不符合最新规则。

于 2016-02-24T11:40:31.443 回答
0

SonarQube C# 插件需要安装 .NET Framework 4.6 版。根据https://msdn.microsoft.com/en-us/library/8z6watww(v=vs.110).aspx,.NET Framework 自 4.5 版起不再支持 Windows Server 2003。

我建议您升级服务器的操作系统并使用最新的 SonarQube C# 插件,而不是被旧的不受支持的软件卡住。

于 2016-03-04T09:28:15.707 回答