如何更改 MSBuild.SonarQube.Runner.exe 的工作目录?
How can I change the working directory of MSBuild.SonarQube.Runner.exe?
我们目前这样调用跑步者:
D:\BuildTools\MSBSonarQubeRunner-1.0.2\MSBuild.SonarQube.Runner.exe begin /k:"someKey" /n:"someName" /v:"someVersion" /d:sonar.resharper.cs.reportPath="K:\somePath\resharper.xml"
我们希望声纳输出在 K:\.sonarqube
我们尝试使用命令行 arg /d:sonar.working.directory=K:\.sonarqube
但没有成功。我们还尝试像这样在 SonarQube.Analysis.xml 中设置工作目录:<Property Name="sonar.working.directory">K:\.sonarqube\</Property>
那也没用...
我们需要将它放在顶层目录中,因为声纳运行程序会抛出 PathTooLongException(输出路径的长度为 286 个字符)。
感谢您的帮助
无法更改 SonarQube Scanner for MSBuild 的工作目录。
但是您可以从另一个文件夹启动构建,但是所有 3 个步骤(begin
、msbuild
和 end
)都必须从该文件夹启动:
- k:
- D:\BuildTools\MSBSonarQubeRunner-1.0.2\MSBuild.SonarQube.Runner.exe 开始....
- msbuild /t:重建 c:\whereever\your\sources\are\Solution.sln
- D:\BuildTools\MSBSonarQubeRunner-1.0.2\MSBuild.SonarQube.Runner.exe 结束
我们目前这样调用跑步者:
D:\BuildTools\MSBSonarQubeRunner-1.0.2\MSBuild.SonarQube.Runner.exe begin /k:"someKey" /n:"someName" /v:"someVersion" /d:sonar.resharper.cs.reportPath="K:\somePath\resharper.xml"
我们希望声纳输出在 K:\.sonarqube
我们尝试使用命令行 arg /d:sonar.working.directory=K:\.sonarqube
但没有成功。我们还尝试像这样在 SonarQube.Analysis.xml 中设置工作目录:<Property Name="sonar.working.directory">K:\.sonarqube\</Property>
那也没用... 我们需要将它放在顶层目录中,因为声纳运行程序会抛出 PathTooLongException(输出路径的长度为 286 个字符)。
感谢您的帮助
无法更改 SonarQube Scanner for MSBuild 的工作目录。
但是您可以从另一个文件夹启动构建,但是所有 3 个步骤(begin
、msbuild
和 end
)都必须从该文件夹启动:
- k:
- D:\BuildTools\MSBSonarQubeRunner-1.0.2\MSBuild.SonarQube.Runner.exe 开始....
- msbuild /t:重建 c:\whereever\your\sources\are\Solution.sln
- D:\BuildTools\MSBSonarQubeRunner-1.0.2\MSBuild.SonarQube.Runner.exe 结束