找不到MSBuild.SonarQube.Internal.PostProcess.exe

找不到MSBuild.SonarQube.Internal.PostProcess.exe,msbuild,sonarqube,opencover,Msbuild,Sonarqube,Opencover,当我将sonar主机从localhost更改为我的计算机ip时,无法为ms build执行sonar run 尝试在sonar.properties文件和sonarqube_analysis.xml中更改主机 c:\HID\project-test\PACS\sonar_opencover\Project>MSBuild.SonarQube.Runner.exe end Default properties file was found at C:\HID\project-test\dot

当我将sonar主机从localhost更改为我的计算机ip时,无法为ms build执行sonar run

尝试在sonar.properties文件和sonarqube_analysis.xml中更改主机

c:\HID\project-test\PACS\sonar_opencover\Project>MSBuild.SonarQube.Runner.exe end
Default properties file was found at C:\HID\project-test\dotnet\MSBuild.SonarQube.Runner-1.0.1\SonarQube.Analysis.xml
Loading analysis properties from C:\HID\project-test\dotnet\MSBuild.SonarQube.Runner-1.0.1\SonarQube.Analysis.xml
Post-processing started.
Execution failed. The specified executable does not exist: c:\HID\project-test\PACS\sonar_opencover\Project\.sonarqube\bin\MSBuild.SonarQube.Internal.PostProcess.exe
Post-processing failed. Exit code: 1
我执行的脚本

@call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\VsDevCmd.bat"
MSBuild.SonarQube.Runner.exe begin /k:"jenkins_test5" /n:"jenkins_test5" /v:"1.0" /d:sonar.cs.opencover.reportsPaths="%CD%\opencover.xml"
msbuild.exe
"C:\HID\project-test\PACS\sonar_opencover\opencover.4.6.210\OpenCover.Console.exe" -output:"%CD%\opencover.xml" -register:user -target:"vstest.console.exe" -targetargs:"UnitTestProject1\bin\Debug\UnitTestProject1.dll"
MSBuild.SonarQube.Runner.exe end

我今天碰到了这个问题。结果发现我错过了qube.Analysis.xml。本质上,它期望

<Property Name="sonar.host.url">http://{server}:9000/sonar</Property>
http://{server}:9000/sonar
包括/sonar(来自服务器上sonar.properties的sonar.web.context设置)


我在SonarQube.Analysis.xml中漏掉了/sonar,并且出现了与您完全相同的症状。

我出现此错误,因为sonarcube url错误,它无法连接到conarcube主机:

<Property Name="sonar.host.url">http://{server}:{Port}</Property>
http://{server}:{Port}
在询问我的同事后,我发现url已更改,我更正了url并成功运行