Skip to content

[BUG] Including the Sentry.AspNetCore package prevents coverage collection #1743

Open
@cn-ml

Description

@cn-ml

Describe the bug
The moment I reference the Sentry.AspNetCore package in my test subject project i get no coverage information whatsoever (specifically Sentry.AspNetCore version 5.5.0). I did not configure the package in any way, nor did i reference it in code. Just including the package reduced my coverage report from a couple hundred KB to an empty report.

To Reproduce

  1. have a project and a xUnit test project for that project
  2. observe that coverage collection works normally
  3. include <PackageReference Include="Sentry.AspNetCore" Version="5.5.0" /> this package reference
  4. observe that coverage no longer works

Expected behavior
I expect the coverage collection to not be influenced by that.

Actual behavior
Coverage collection outputs this:

<coverage line-rate="0" branch-rate="0" version="1.9" timestamp="1743637253" lines-covered="0" lines-valid="0" branches-covered="0" branches-valid="0">
  <sources/>
  <packages/>
</coverage>

Configuration (please complete the following information):
Please provide more information on your .NET configuration:
* Which coverlet package and version was used? 6.0.4
* Which version of .NET is the code running on? 10.0.100-preview.2.25164.34
* What OS and version, and what distro if applicable? Win11 24H2 x86_64 and Ubuntu 24.04.2 LTS aarch64 and Alpine Linux 3.21 aarch64
* What is the architecture (x64, x86, ARM, ARM64)? x64 and ARM64 in the above configurations
* Do you know whether it is specific to that configuration? I assume it is not, tested on very different platforms.

❗ Please also read Known Issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs more infoMore details are neededquestionThis issue is a question

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions