Following are some of the common errors and their solution which may occur while performing sonar analysis in C# ecosystem.

 Error while reading FxCop result file

Set Encoding Property in Sonar-Runner Properties (If running FxCop)
If using FxCop plugin within Sonar, then make change in runner sonar.properties file.
Uncomment the line: sonar.sourceEncoding=UTF-8, else you may get the error “Error while reading FxCop result file


FxCop error code 521

Set assemblyDependencyDirectories Property in Sonar-Runner : The value of this should be the Comma-seperated list of path patterns to locate the directories where dependency assemblies can be found.

 These paths can be absolute or relative, the starting point being the folders where the csproj files are located. Also the special key "$(SolutionDir)" can be used to build a path relative to the root folder of the solution (i.e. where the sln file is located). 

E.g.: "$(SolutionDir)/**/libs" (and not "$(SolutionDir)/**/libs/*.dll")
Eg: sonar.fxcop.assemblyDependencyDirectories=$(SolutionDir)/**/libs,$(SolutionDir)/**/Debug


FxCop error code 9

For the reason , explanation and solution of error "

FxCop execution failed with return code 9 while doing Sonar Analysis.

0 comments:

Post a Comment

 
Top