我正在尝试使用sonarqube分析一个c#项目,但是我继续收到一个错误,说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
答案 0 :(得分:0)
使用不依赖/使用sonarlint的c#插件版本,我使用3.3,问题是它是旧版本,所以不是最新的规则。
答案 1 :(得分:0)
SonarQube C#插件需要安装.NET Framework 4.6版。根据{{3}},.NET Framework自4.5版以来不再支持Windows Server 2003。
我建议您升级服务器的操作系统并使用最新的SonarQube C#插件,而不是使用旧的不支持的软件。