I want to generate code analysis report from the Build Pipeline. I have recently moved from Fxcopcmd.exe to Roslyn based analyzers. I am able to see warnings in the build log, but I am not able to get a seperate report that can be shared with comeplete team.
I have already added the Nuget packages for running the code analysis Step used during build is shown below
- task: VSBuild@1
displayName: 'Build solution **\MySolution.sln'
inputs:
solution: '$(Parameters.solution)'
vsVersion: 15.0
msbuildArgs: '/t:rebuild'
platform: '$(BuildPlatform)'
configuration: '$(BuildConfiguration)'
/p:RunCodeAnalysis=true
it will run the Legacy FxCopCmd.exe not the FxCop Analyzer which I have migrated into. As mentioned in the link you provided, RunCodeAnalysis is being deprecated and the newer roslyn based FXCop analyzers are the way to go moving forward. FXCop analyzers will run without any arguments (if required nugets are already installed) – Steffi