是否可以在CSProj文件上而不是解决方案上运行MSBUILD.SONARQUBE.RUNNER? [英] Is it possible to run the MSBUILD.SONARQUBE.RUNNER on a CSProj file as opposed to a solution?
问题描述
我有一个TFS xaml构建模板,该模板在xaml中的msbuild任务之前和之后运行msbuild.sonarqube.runner开始(和结束).
I have a TFS xaml Build template that runs the msbuild.sonarqube.runner start (and end) before and (after the) msbuild task in the xaml.
使用.sln文件,这一切都可以很好地工作.作为正在构建的文件.
It all works well enough with a .sln file. As the file under build.
但是,当我尝试在.csproj文件上运行msbuild的构建中使用此功能时,最终进程报告说它找不到后处理exe.
However, when I attempt to use this on a build that runs msbuild on a .csproj file the end process reports that it cannot find the postprocess exe.
执行失败.指定的可执行文件不存在:.sonarqube \ bin \ MSBuild.SonarQube.Internal.PostProcess.exe"
"Execution failed. The specified executable does not exist: .sonarqube\bin\MSBuild.SonarQube.Internal.PostProcess.exe"
启动命令没有给出错误指示.
there no error indication given by the Start command.
我需要做些特别的事情才能使它正常工作吗,或者这是MSBuild运行器的限制吗?
is there something special I need to do to get this to work, or is this a limitation of the MSBuild runner?
请帮助. 我的整个团队都热衷于使用该工具,但是由于它只是正在分析的现有构建的一小部分
Please help. My whole team is keen to use the tool, but as it is only a fraction of the existing builds are being analyzed
谢谢
Jeff Gedney
Jeff Gedney
推荐答案
SonarQube Scanner for MSBuild的begin
和end
命令以及所有msbuild
命令必须从相同的当前工作目录启动.确实,他们都需要访问由begin
命令创建的.sonarqube
文件夹.
The begin
and end
commands of the SonarQube Scanner for MSBuild, as well as all msbuild
commands MUST be launched from the same current working directory. Indeed, they will all need access to the .sonarqube
folder that is created by the begin
command.
除此之外,如果需要,您可以在* .csproj文件而不是* .sln上启动MSBuild-SonarQube Scanner for MSBuild支持.
Other than that, you can launch MSBuild on a *.csproj file instead of a *.sln if you prefer - that is supported by the SonarQube Scanner for MSBuild.
我创建了以下票证来改善错误消息,以防从错误的文件夹启动end
时出现: https://jira.sonarsource.com/browse/SONARMSBRU-160
I've created the following ticket to improve the error message in case end
is launched from the wrong folder: https://jira.sonarsource.com/browse/SONARMSBRU-160
这篇关于是否可以在CSProj文件上而不是解决方案上运行MSBUILD.SONARQUBE.RUNNER?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!