Dotcover Code coverage from command line - Getting empty results - VS2017

Answered
 

I am working on the code coverage for my application.I am able to see the code coverage results from VS 2017(DotCover). But when i try to do the same from command line, the output file gets generated and it is showing empty results. Below is the command i have tried:

C:\Users\Administrator\AppData\Local\JetBrains\Installations\dotCover08\dotCover.exe cover
/TargetExecutable=C:PATH\nunit3-console.exe
/TargetArguments=C:\PATH\bin\Release\Poject.UnitTest.dll
/Output=AppCoverageReport.dcvr
/LogFile=Log.txt

In the log, it says "Coverage analysis: Instrumentation was requested, but wasn't made".

Please help me to resolve it.

3 comments

Hello Vvinay In,

Please ensure that your tested assemblies have PDBs. "...\bin\Release" usually means that they don't have. It is impossible to have coverage without PDBs

1

Thanks @Alexander Mikhailov.. I have changed the path to bin\Debug where pdb file is exist. 

I got the result now as HTML. But the coverage result is not reflected to sonarqube dashboard. Below is the code

 

MSBuild.exe begin /k:"ProjectTemplate" /n:"Template" /v:"1.0" /d:sonar.cs.dotcover.reportsPaths="%CD%\dotCover.xml”

 

0

Hello Vvinay In,

sorry for delay in replying. I can't help you much with sonarqube. But do I get that correctly that after changing path, dotCover report is not empty anymore?

0

Please sign in to leave a comment.