如何更改MSBuild.SonarQube.Runner.exe的工作目录? [英] How can I change the working directory of MSBuild.SonarQube.Runner.exe?
问题描述
我们目前这样称呼跑步者:
We are currently calling the runner like this:
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中获得声纳的输出
We want to have the output of sonar in K:\.sonarqube
我们尝试使用命令行arg /d:sonar.working.directory=K:\\.sonarqube
,但这没有用.我们还尝试像这样在SonarQube.Analysis.xml中设置工作目录:<Property Name="sonar.working.directory">K:\.sonarqube\</Property>
We tried to use the command line arg /d:sonar.working.directory=K:\\.sonarqube
but that didn't work. We also tried setting the working directory in the SonarQube.Analysis.xml like this: <Property Name="sonar.working.directory">K:\.sonarqube\</Property>
那也行不通... 我们需要将其放在顶层目录中,因为声纳运行器会引发PathTooLongException(输出路径的长度为286个字符).
That didn't work too ... We need to have it in a top directory, because the sonar runner throws an PathTooLongException (out path is 286 characters long).
谢谢您的帮助
推荐答案
无法更改SonarQube Scanner for MSBuild的工作目录.
It is not possible to change the working directory of the SonarQube Scanner for MSBuild.
但是,您可以从另一个文件夹启动构建,但是所有3个步骤(begin
,msbuild
和end
)必须从该文件夹启动:
You can however launch the build from another folder, but all 3 steps (begin
, msbuild
and end
) must be launched from that folder:
- k:
- D:\ BuildTools \ MSBSonarQubeRunner-1.0.2 \ MSBuild.SonarQube.Runner.exe开始....
- msbuild/t:rebuild c:\ where \ your \ sources \ are \ Solution.sln
- D:\ BuildTools \ MSBSonarQubeRunner-1.0.2 \ MSBuild.SonarQube.Runner.exe结尾
这篇关于如何更改MSBuild.SonarQube.Runner.exe的工作目录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!