I'm using OpenCover to generate test coverage reports for my projects, but it's not generating any data. Checking in my logs, it's showing "missing pdb" for the dlls in question, however the pdbs are available in the same directory.
Things I've tried:
I'm using a command line of
opencover.console -oldstyle -register:user
-target:"C:\Program Files\Dotnet\dotnet.exe"
-targetargs:"test"
-searchdirs:"C:\dev\public\hermes-c#\Hermes.Server\Hermes.AspNetCore.Test\bin\Debug\netcoreapp1.0"
Any and all thoughts appreciated!
.NET Core uses a "Portable PDB" format by default, which OpenCover does not understand yet.
Try the following build options instead:
"buildOptions": {
"debugType": "full"
},
Note: when using full
the generated debug symbols are for Windows only...
Update: with MSBuild based projects this becomes:
<PropertyGroup>
<DebugType>full</DebugType>
</PropertyGroup>
And, we're able to build using the /p:DebugType=Full
switch too. Thus, the "ordinary" build can use the default debug setting, but a "special" build for coverage analysis can change that to full.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With