【问题标题】:C# project in sonarqubesonarqube 中的 C# 项目
【发布时间】:2016-07-29 22:53:13
【问题描述】:

当我运行 sonar-runner 进行分析时,我的简单 C# 项目分析会因权限被拒绝的 SonarLint.Runner.exe 错误而终止:

ERROR: Error during SonarQube Scanner execution
ERROR: java.io.IOException: Cannot run program "/opt/sonarqube-5.4/projects/ArturiCSharpSort/.sonar/SonarLint.Runner/SonarLint.Runner.exe": error=13, Permission denied
ERROR: Caused by: Cannot run program "/opt/sonarqube-5.4/projects/ArturiCSharpSort/.sonar/SonarLint.Runner/SonarLint.Runner.exe": error=13, Permission denied
ERROR: Caused by: error=13, Permission denied

有效

-rw-r--r-- 1 root root 19456 Apr  5 11:14 .sonar/Lint.Runner/SonarLint.Runner.exe

以下是我的 sonar-project.properties:

# Root project information

sonar.projectKey=ArturiCSharpSort

sonar.projectName=ArturiCSharpSort

sonar.projectVersion=1.0

# Some properties that will be inherited by the modules

sonar.sources=.

#List of the module identifiers

#sonar.modules=

# Properties can obviously be overriden for

# each module - just prefix them with the module ID

#module1.sonar.projectName=

#module2.sonar.projectName=

我尝试对 SonarLint.Runner.exe 执行 chmod,但每次分析都会重新构建。 如何对 C# 项目进行分析?

【问题讨论】:

    标签: c# sonarqube


    【解决方案1】:

    C# 项目的分析必须在 Windows 环境中完成。这里失败了,因为项目是在 Linux 上分析的。

    问题是 SonarQube C# Plugin 确实针对 Windows .NET 生态系统,无论如何,您都可以在其中构建/维护 .NET 项目。它必须与需要 MSBuild 14.0 的 SonarQube Scanner for MSBuild 一起使用。

    【讨论】:

    • 好的,谢谢。在我尝试为 SonarQube 构建 Windows 环境之后,我希望它可以工作。
    • 嗨,现在我正在运行带有 SonarLint 插件的 Visual Studio 2015。我连接到我的服务器,将其绑定到 SonarQube 服务器,然后我可以运行分析。哇!!但是浏览 webapp 我找不到我的应用程序!什么问题???
    猜你喜欢
    • 2018-01-05
    • 2018-07-02
    • 2017-06-29
    • 2017-05-09
    • 1970-01-01
    • 2015-10-18
    • 2018-09-22
    • 2018-05-12
    相关资源
    最近更新 更多