Skip to content

[BUG] Code coverage file not generated with OpenCover / XUnit #1892

@SaxoLigtorn

Description

@SaxoLigtorn

Describe the bug
No coverage file is generated, as it should

To Reproduce
run the following command in the tests folder
dotnet test --coverlet --coverlet-output-format opencover --results-directory ./TestResults -diagnostic --configuration Debug --diagnostic-verbosity trace

Expected behavior
An OpenCover coverage file should be generated

Actual behavior
The command runs with success, but nothing is created. The diagnostic file showns the following

2026-04-14T15:08:00.0193419+00:00 Coverlet TRACE Coverage enabled (--coverlet flag): True
2026-04-14T15:08:00.0196161+00:00 Coverlet ERROR Could not determine test module path. Coverage disabled.

Configuration (please complete the following information):
Please provide more information on your .NET configuration:
* coverlet.MTP 8.0.1
* Microsoft.Testing.Platform 2.2.1
* xunit.v3.mtp-v2 3.2.2

.NET: net10.0
OS: Windows 24H2
Architecture: AnyCPU

❗ Please also read Known Issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionThis issue is a question

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions