MSBuild无法通过代码分析生成XML文件 [英] Msbuild not producing XML file with code analysis
问题描述
I have been digging but cannot find the answer - I THOUGHT I had found it in this question but it is not working on my system. The only difference that I can see is that I am giving msbuild a solution file and not an individual project file - must I do it at the project level to get output? The command line I entered was:
msbuild Interlink.NET.sln /p:RunCodeAnalysis=true /p:CodeAnalysisLogFile=test.xml
很显然,没有创建test.xml,或者我不会问这个问题...
Obviously, test.xml was not created or I would not be asking this question...
该解决方案是VS2015中的C#项目,以防任何影响.在Visual Studio中,我可以选择分析|在解决方案上运行代码分析",并且一切正常.我想将分析合并到自动化的构建过程中,并使用分析生成XML文件.
The solution is a C# project in VS2015, in case any of that effects things. In Visual Studio, I can select "Analyze | Run Code Analysis on Solution" and things work as expected. I want to incorporate the analysis into an automated build process and produce an XML file with the analysis.
推荐答案
请参考以下论坛
https://stackoverflow.com /questions/30472569/how-to-get-an-xml-report-out-of-msbuild-code-analysis
msbuild MyProject.csproj /p:RunCodeAnalysis=true /p:CodeAnalysisLogFile=MyXmlReport.xml
这篇关于MSBuild无法通过代码分析生成XML文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!