-
Notifications
You must be signed in to change notification settings - Fork 248
Support portable pdb files #610
Comments
That code has been there since 31/7/2015 but OpenCover has been using the package 0.9.6.1 from 30/5/2015 [so the fix has not been available], however it seems that just yesterday 19/6/2016 a new package 0.9.6.3 was released; there was no 0.9.6.2. So it looks like it was released just in time for us to address this feature. |
Nice to read that! Looking forward to coverage reports over Dotnet Core C# and F# ;) |
Unfortunate 0.9.6.3 does not work and the library is throwing an exception. Will try and investigate but it may not be trivial |
Okay it seems the fix is in master for the next release (0.10.) but is not available for the 0.9.6. packages |
Thanks a lot for sharing you information. I would be happy to make some tests with C# and F# on dotnet core if you manage to release a pre-release on nuget based on the cecil pre-release. |
I have a build available here - https://ci.appveyor.com/project/sawilde/opencover/build/4.6.589 The new mono.cecil is due in a week or so, so I'll probably wait for that before pushing out a new OpenCover package. |
Hi there. good work! Using your appveyor build I could run my unit tests with portable pdb files and the coverage for C# was reported. Cool! Unfortunately Opencover still complains about MissingPdb in an F# project with portable pdb's. Is there a way to get some more info from OpenCover about the actual reason? Or could I provide you a sample so that you can step through with a debugger? I could attach some binaries to this issue or alternatively you could take a look at https://github.com/jp7677/hellocoreclr, though the latest master doesn't yet has the "debugType": "portable" switch in the projects.json's. |
FYI, updating Microsoft.FSharp.Core.netcore to 1.0.0-alpha-160727 makes no difference. Though of course still possible that the f# coverage issue is related to an issue in f# for .net core and not something within OpenCover. |
@jp7677 - A sample would be better as then I am testing the same thing as you are; always hard to replicate these things sometimes. |
@sawilde You could:
Please let me know if above works for you or if I can help in a different way. |
Hi @sawilde I have tested the portable pdb's i.c.w. C# and F# in Dotnet Core 1.1 again with your pre-release again. The C# code was already perfectly covered. It seems that coverage of F# sources is also correctly reported now. Dunno if its DotNet 1.1 or the latest versions of the F# packages for Dotnet Core, but its working now. Very cool ;) |
Awesome - thanks for the update |
Any idea when this will hit nuget.org? |
nope - as I have said I am waiting on Mono.Cecil to come out of beta |
Okay, any chance you can setup a MyGet feed so we can just reference that until then? |
Yeah, or just a beta release on NuGet would be awesome. 🙏 |
With ppdb's one thing to note is that they can be embedded in the dll. They may not be a standalone dll. |
Until this is available does anyone have a workaround for F#? I can set DebugType full in a .csproj and it generates the windows .pdbs, but if I do the same for an .fsproj, no .pdb is produced at all :( |
@DaveEmmerson Debug type needs to be "portable" for F#. Furthermore you will need the OpenCover version with the experimental portable-pdb support from this conversation (https://ci.appveyor.com/project/sawilde/opencover/build/4.6.589). See https://github.com/jp7677/hellocoreclr/blob/master/src/HelloCoreClrApp.Rules/project.json and https://github.com/jp7677/hellocoreclr/blob/master/appveyor.yml, https://github.com/jp7677/hellocoreclr/blob/master/NuGet.Config for a sample. |
@jp7677 thanks. The documentation on the F# side isn't quite right, so they're going to look at making it clear that they only do portable. dotnet/fsharp#2565 I've used your method and it worked fine, cheers 👍 |
Closing this issue as it is covered by #595
|
Opencover not creating any profling information
here is my target which gets executed with a issue stating that the portable is missing |
https://github.com/manjushavnair/MVCDOTNET/blob/master/MVCAppTests/MVCAppTests.csproj I have my Target Name="CoverageOC" which works but shows an error that portable is missing |
@manjushavnair please raise this as a new issue rather than hijack an old one - thanks |
Please provide the following information when submitting an issue, where appropriate replace the
[ ]
with a[X]
My Framework
My Environment
I have already...
My issue is related to (check only those which apply):
Expected Behavior
OpenCover should report some coverage when profiling dotnet core assemblies with portable pdb's.
Actual Behavior
The assemblies are skipped due to "MissingPdb"
Steps to reproduce the problem:
Compile a dotnet core assembly with
"debugType": "portable"
in buildOptions in the project.json and profile some tests using OpenCover.Dotnet Core introduced a new format for pdb files (https://github.com/dotnet/core/blob/master/Documentation/diagnostics/portable_pdb.md). OpenCover shoud support this new format when profiling. As stated here #601 Mono.Cecil should provide the needed support. It seems the code is already there: jbevain/cecil@7cde491.
The text was updated successfully, but these errors were encountered: