Parameters used by several plugins, such as "build configurations", have been put on this page as well. |
Name | Key | Default value | Description |
|---|---|---|---|
.NET 2.0 SDK directory | sonar.dotnet.2.0.sdk.directory | C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727 | Absolute path of the .NET SDK 2.0 directory. |
.NET 3.5 SDK directory | sonar.dotnet.3.5.sdk.directory | C:/WINDOWS/Microsoft.NET/Framework/v3.5 | Absolute path of the .NET SDK 3.5 directory. |
.NET 4.0 SDK directory | sonar.dotnet.4.0.sdk.directory | C:/WINDOWS/Microsoft.NET/Framework/v4.0.30319 | Absolute path of the .NET SDK 4.0 directory. |
.NET version | sonar.dotnet.version | 4.0 | Default version of the .NET framework that must be used. |
Silverlight 3 assembly directory | sonar.silverlight.3.mscorlib.location | C:/Program Files/Reference Assemblies/Microsoft/Framework/Silverlight/v3.0 | Location of the core assembly for Silverlight 3 framework. |
Silverlight 4 assembly directory | sonar.silverlight.4.mscorlib.location | C:/Program Files/Reference Assemblies/Microsoft/Framework/Silverlight/v4.0 | Location of the core assembly for Silverlight 4 framework. |
Silverlight version | sonar.silverlight.version | 4 | Default version of the Silverlight framework that must be used. |
Test project names | sonar.donet.visualstudio.testProjectPattern | *.Tests | Pattern that check project names to identify unit test projects. Multiple patterns may be specified using semicolon as a delimiter. |
| Integration test project names (since v1.3) | sonar.dotnet.visualstudio.itProjectPattern | Pattern that check project names to identify integration test projects. Multiple patterns may be specified using semicolon as a delimiter. If there is no pattern specified, unit test patterns are used. | |
Solution to analyse | sonar.dotnet.visualstudio.solution.file |
| Relative path to the ".sln" file that represents the solution to analyse. If none provided, a ".sln" file will be searched at the root of the project. |
Exclude generated code | sonar.dotnet.excludeGeneratedCode | true | Set to false to include generated code like 'Reference.cs' files or '*.designer.cs' files. |
Ant style patterns can be used. "*" means any file or any directory. "**" means any directory and subdirectory. For example "**/Foo*.dll" means any dll file prefixed by "Foo" anywhere in a project. If you need to reference assembly files outside your solution folder, you can use absolute paths or "../". For example "$(SolutionDir)/../lib/**.*dll" can be used to specify all the dll files of a lib folder located at the same level as the root folder of your visual studio solution. $(SolutionDir) is not the only available expression, check out the configuration page to get the exhaustive list. |
Name | Key | Default value | Description | |
|---|---|---|---|---|
Build configuration | sonar.dotnet.buildConfiguration | Debug | Not needed in most cases. | |
| Build platform (since v1.4) | sonar.dotnet.buildPlatform | "Any CPU" | Works with the "build configuration" parameter. Specifies the platform for which the solution has been built. This parameter is used with the "build configuration" parameter to locate the generated assemblies that need to be analysed by sonar. | |
Assemblies to scan (since v1.1) | sonar.dotnet.assemblies |
| Not needed in most cases.
Tools such as FxCop and Gendarme that work on compiled code are executed once per project. Hence the above pattern will be evaluated for each project of the solution using the proper values of "AssemblyName" and "OutputType" expressions. Do not use this property unless you have no choice | |
| Resource key generation strategy (since v1.4) | sonar.dotnet.key.generation.strategy | Set this property to value "safe" if you encounter any "NonUniqueResultException" error as described in this thread. |
Sonar C# support most parameters described in the Analysis Parameters page, at least the non java specific ones. |
Each time you need to specify a path, or a pattern to locate files, use "/" instead of "\" |