Question

I am trying to run code coverage with open cover through sonar. I am using the following:

Sonar 3.5
C# Plugins Ecosystem 2.0
OpenCover 4.5.1313
Gallio v3.4.14.0
sonar-runner 2.1

When I run sonar-runner the tests run and OpenCover Runs, the reports are in the .sonar folder but the sonar website is never updated and my Coverage remains at 0%.

The issue seems similar to this

Here are my sonar-project-properties

# Project identification
sonar.projectKey=Simple.Project
sonar.projectVersion=1
sonar.projectName=Simple
# Info required for Sonar 
sonar.sources=.
sonar.language=cs
#Core C# Settings 
#sonar.dotnet.visualstudio.solution.file=Source/TAMPWebsite/TAMPWebsite.sln
sonar.silverlight.4.mscorlib.location=C:/Program Files (x86)/Reference Assemblies/Microsoft/Framework/Silverlight/v4.0
sonar.dotnet.excludeGeneratedCode=true
sonar.dotnet.4.0.sdk.directory=C:/WIndows/Microsoft.NET/Framework/v4.0.30319
sonar.dotnet.version=4.0

#Gendarme
sonar.gendarme.mode= 

sonar.sourceEncoding=UTF-8

# Gallio / Unit Tests
sonar.gallio.mode=
sonar.gallio.coverage.tool=OpenCover
sonar.gallio.runner=IsolatedProcess
sonar.gallio.installDirectory=C:/Program Files (x86)/Gallio
sonar.dotnet.visualstudio.testProjectPattern=*Test*
sonar.opencover.installDirectory=C:/Program Files (x86)/OpenCover/

# FXCop 
sonar.fxcop.mode=skip  
#StyleCop 
sonar.stylecop.mode=skip
#NDeps
sonar.ndeps.mode=skip
#sonar.switchoffviolations.allfile=DatabaseMigrations
#exclusions
#sonar.exclusions=**generated*,**T4MVC**,**/DatabaseMigrations/**

Was it helpful?

Solution

You're facing this bug: http://jira.codehaus.org/browse/SONARDOTNT-301

It is fixed and will be available in the 2.1 release which will be out in a couple of days.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top