Search code examples
sonarqubefxcopsonar-runnersonarqube-4.5sonarqube-4.0

Unable to execute FXCop analysis in SonarQube


Executing Sonar (version 4.5.4) analysis on a C# sln using the C# built in plugin (version 4.0). I've set in the settings the location of the FxCopCmd.exe, but I get the following in the execution: "All FxCop rules are disabled, skipping its execution" How do I enable the rules?

Thanks,

Ariel


Solution

  • Try this:

    • Login into Sonar as administrator
    • Click on 'Rules'and select C#
    • Under Repository section search for FxCop and add it (it should show a certain number of rules)
    • With C# and FxCop selected, click on 'Bulk Change' or 'Settings icon' (depends on which version of sonar you're running), and select 'Activate in.."
    • In the search box that appears, add the sonar profile you want to activate these rules in (e.g. Sonar Way), and select Apply