Skip to content

Commit 7c8c6fa

Browse files
authored
add known issue BadImageFormatException (#1696)
* add known issue BadImageFormatException * remove % from title
1 parent b36b671 commit 7c8c6fa

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

Documentation/KnownIssues.md

+16-1
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ Stack Trace:
183183

184184
*Solution:* Looks like this is caused by xUnit's app domains. For `dotnet test`, it can be disabled with the following argument: `-- RunConfiguration.DisableAppDomain=true`
185185

186-
## Code coverage returns NaN%
186+
## Code coverage returns NaN
187187

188188
*Symptoms:* You are getting following result when running Coverlet within CI/CD pipeline:
189189

@@ -234,3 +234,18 @@ The XML code coverage report is too large for the coverlet to parse.
234234
*Potential Solutions:*
235235

236236
* Reduce noise from auto generated code, for example excluding your EntityFrameworkCore Migrations namespace or automatically generated typed Http Clients. See [Excluding From Coverage](./MSBuildIntegration.md#excluding-from-coverage) for more information on ignoring namespaces from code coverage.
237+
238+
## BadImageFormatException .NET Framework 4.7.x, 4.8.x
239+
240+
*Symptoms:*
241+
242+
```text
243+
BadImageFormatException during MetadataReaderProvider.FromPortablePdbStream in InstrumentationHelper.PortablePdbHasLocalSource, unable to check if the module has got local source.
244+
```
245+
246+
*Solutions:*
247+
248+
Change [DebugType](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-options/code-generation#debugtype) from `full` to `portable`.
249+
250+
>[!IMPORTANT]
251+
>NET Core introduces a new symbol file (PDB) format - portable PDBs. Unlike traditional PDBs which are Windows-only, portable PDBs can be created and read on all platforms.

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
| coverlet.msbuild | [![NuGet](https://img.shields.io/nuget/v/coverlet.msbuild.svg)](https://www.nuget.org/packages/coverlet.msbuild/) | [![NuGet](https://img.shields.io/nuget/dt/coverlet.msbuild.svg)](https://www.nuget.org/packages/coverlet.msbuild/) |
99
| coverlet.console | [![NuGet](https://img.shields.io/nuget/v/coverlet.console.svg)](https://www.nuget.org/packages/coverlet.console/) | [![NuGet](https://img.shields.io/nuget/dt/coverlet.console.svg)](https://www.nuget.org/packages/coverlet.console/) |
1010

11-
Coverlet is a cross platform code coverage framework for .NET, with support for line, branch and method coverage. It works with .NET Framework on Windows and .NET Core on all supported platforms.
11+
Coverlet is a cross platform code coverage framework for .NET, with support for line, branch and method coverage. It works with [.NET Framework](Documentation/KnownIssues.md#badimageformatexception-net-framework-47x-48x) on Windows and .NET Core on all supported platforms.
1212

1313
**Coverlet documentation reflect the current repository state of the features, not the released ones.**
1414
**Check the [changelog](Documentation/Changelog.md) to understand if the documented feature you want to use has been officially released.**

0 commit comments

Comments
 (0)