I'm getting below error on windows agent while beginning the Sonarqube scanner.
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.
Below is the command I have used inside my workflow.
- 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 }}"
Does anyone have idea how to resolve this? Please help.