As an update to my previous post, I would like to add a few important points re. using FxCop from within SonarQube.
First, it is tricky to get up and running. I ran into all the difficulties described here.
In short, to get FxCop analysis results in SonarQube, from a build triggered in TeamCity, do the following:
- Install FxCop. That is done by first downloading and installing the Windows 7 SDK.
- If the SDK installer fails, check if you have the situation described here. (Basically: Do you have the C++ redists installed? If so, uninstall both temporarily, then reinstall them afterwards).
- Once you finally have the SDK installed, install FxCop by running the [SDKpath]/bin/FxCop/FxCopSetup.exe file. (Oh, yes – an installer that installs an installer. Nice.)
- Enter the path to FxCopCmd.exe on the SonarQube project settings > C# > Code Analysis/FxCop page:
And now, after a succesful build from TeamCity you should – finally – begin to see FxCop results in SonarQube!
Leave a Reply