Running MSBuild with /p:RunCodeAnalysis=true
on a C# project does generate the code analysis warnings on the build output, but what's the switch that lets me export these warnings (only the code analysis warnings not the entire build output) to an XML file?
The XML report is generated by default. The file name is MyAssembly.dll.CodeAnalysisLog.xml
or MyApplication.exe.CodeAnalysisLog.xml
, you should be able to find it in the output folder for you project.
To change name of the XML report, use parameter CodeAnalysisLogFile
:
msbuild MyProject.csproj /p:RunCodeAnalysis=true /p:CodeAnalysisLogFile=MyXmlReport.xml
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With