Skip to content

Code coverage excludes .NET Framework VB projects using portable pdb files #1100

Open
@mattwildgoose

Description

@mattwildgoose

I've been using coverlet for a while now on a large solution containing many .NET Framework 4.8 projects in both VB and C#. It was all working fine until recently we updated the projects to generate portable pdb files instead of the legacy windows format. Now the coverage data only includes C# projects despite tests being executed for the VB projects.

I've created a repository on github to demonstrate the issue
https://github.com/mattwildgoose/CovertletNet48PortablePdbIssue

I believe that the issue lies in InstrumentationHelper.PortablePdbHasLocalSource which iterates over the Documents inside the portable pdb meta data and if it cannot locate the relevant file then it will not instrument the module.

For VB projects compiled on .NET 4.8 it appears that the portable pdb contains a strange empty item (shown below using JetBrains dotPeek) which means the entire module is skipped

image

I don't know enough about the pdb generation to know whether this entry should be there or not (feels like it shouldn't). But is this something that you can account for in coverlet so I'm able to collect coverage data without going back to the legacy pdb format which is Windows only and significantly larger?

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingstaletracking-external-issueThe issue is caused by external problem - nothing we can do to fix it directly

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions