The C# Ecosystem is a Set of Plugins
The C# Ecosystem offers the following plugins:
- Mandatory plugins:
- : the core plugin that defines API used by every other plugin in the ecosystem.
: the plugin that parses C# code source, computes metrics and detects copy-paste.
- Optional plugins adding features from external tools:
- FxCop analyses to detect issues related to potential bugs, tight coupling, globalization, etc. : launches
- Gendarme analyses to detect issues related to coding bad practices, smell detection, performance, etc : launches
- Gallio to run tests and gets execution report as well as coverage report (using PartCover or OpenCover or NCover or ...). : launches
- : launches a dependency parser tool, built on Mono Cecil, to get dependency data between assemblies and classes.
- StyleCop analyses to detect issues mainly related to coding style (formatting, comments, ...). : launches
The C# Ecosystem has the following requirements on top of the SonarQube requirements:
- Your C# code base must be developed with Visual Studio, and thus must contain a ".sln" file (.NET Solution).
- If you want SonarQube to compute test metrics, unit/integration tests must be isolated from the main code base in dedicated Visual Studio Projects. Also the test framework must be compatible with Gallio.
Supported versions are:
Up to 5.0
2.0, 3.5, 4.0 and 4.5
3, 4 and 5
Tested with VS 2008, VS 2010 and VS 2012 ".sln" files.
Older versions may also be supported (feel free to give feedback)
Installing the C# Ecosystem Plugins
- Install the .NET and C# plugins from the Update Center
- Prior to SonarQube 3.5: you need to click on the Install button of all the 7 plugins
- Since SonarQube 3.5: you just need to click on the Install button of the C# group, this will install everything including the .NET plugins
- Restart the SonarQube server
Installing the External Tools
Depending on which plugins you chose to install, you may need to install the corresponding external tools. If you can, we advise you to install the same versions as the one we use for testing (i.e. the one in bold in the below table).
Install required if plugin selected?
Web site / download / install guide
Supported versions (Tested one in bold)
NO, StyleCop 4.7 binaries are embedded in the plugin.
NO, Gendarme 2.10 binaries are embedded in the plugin.
3.1 Update 2 + (3.2.3)
YES if you want to use PartCover as the coverage engine.
2.2, 2.3 and 4.0 (4.0)
YES if you want to use NCover as the coverage engine
YES if you want to use OpenCover as the coverage engine.
1.0.X, 2.0.X, 4.0.X (4.0.1118)
|JetBrains dotCover||YES if you want to use dotCover as the coverage engine.||http://www.jetbrains.com/dotcover/||1.X, 2.X (1.2 & 2.0)|
|NDeps||NO, binaries are embedded in the plugin.||https://github.com/grozeille/DependencyParser|
- These external tools need the .Net framework to be installed. FxCop10 and OpenCover require .Net 4 but the other ones run fine with .Net 3.5.
- StyleCop plugin relies on MsBuild to run the analysis.