首页 > 解决方案 > Windows 代理无法识别 SonarScanner.MSBuild.exe - GitHub Actions

问题描述

开始 Sonarqube 扫描仪时,我在 Windows 代理上遇到错误。

MSBuild.SonarQube.Runner.exe : The term 'MSBuild.SonarQube.Runner.exe' is not recognized as the name of a cmdlet, 
function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the 
path is correct and try again.

以下是我在工作流程中使用的命令。

- name: Build and analyze
      env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}  
      shell: powershell
      run: |
          MSBuild.SonarQube.Runner.exe begin /k:"${{ env.PROJECT_KEY }}" /v:"${{ env.YEAR }}.${{ env.PERIOD }}.${{ env.REVISION }}.${{ github.run_number }}" /n:${{ env.PROJECT_NAME }} /d:sonar.host.url=${{ env.SONARQUBE_HOST_URL }} /d:sonar.login=${{ secrets.SONAR_TOKEN }}  /d:sonar.verbose="false"
          msbuild ProjectName.sln /p:SkipInvalidConfigurations=true /p:TrackFileAccess=false /p:Configuration=Release /p:Platform="x86"
          MSBuild.SonarQube.Runner.exe end /d:sonar.login="${{ secrets.SONAR_TOKEN }}"

有谁知道如何解决这个问题?请帮忙。

标签: msbuildsonarqubegithub-actionssonarqube-scansonarqube-msbuild-runner

解决方案


推荐阅读