-
Notifications
You must be signed in to change notification settings - Fork 392
Description
Describe the bug
System.MissingMethodException: Method not found: 'System.Collections.Immutable.ImmutableArray`1<System.Reflection.PortableExecutable.DebugDirectoryEntry>
To Reproduce
.Net 7 Project with XUnit using coverlet collector (6.0.1-preview.17.g473777) with VSTest.
Expected behavior
No error and actually generate coverage file that is not empty.
Actual behavior
Repeated Errors:
TpTrace Warning: 0 : 6332, 1, 2023/09/20, 21:26:41.391, 6181671638940, datacollector.exe, [coverlet]Unable to instrument module: 'C:\agent\devops_work\31\s\JusticeNext\CMIJustice.Tests\publish\AutoFixture.AutoMoq.dll'
System.MissingMethodException: Method not found: 'System.Collections.Immutable.ImmutableArray1<System.Reflection.PortableExecutable.DebugDirectoryEntry> System.Reflection.PortableExecutable.PEReader.ReadDebugDirectory()'. at Coverlet.Core.Helpers.InstrumentationHelper.HasPdb(String module, Boolean& embedded) at Coverlet.Core.Instrumentation.Instrumenter.CanInstrument() in /_/src/coverlet.core/Instrumentation/Instrumenter.cs:line 107 TpTrace Warning: 0 : 6332, 1, 2023/09/20, 21:26:41.391, 6181671642758, datacollector.exe, [coverlet]Unable to instrument module: 'C:\agent\devops\_work\31\s\JusticeNext\CMIJustice.Tests\publish\AutoFixture.dll' System.MissingMethodException: Method not found: 'System.Collections.Immutable.ImmutableArray1<System.Reflection.PortableExecutable.DebugDirectoryEntry> System.Reflection.PortableExecutable.PEReader.ReadDebugDirectory()'.
at Coverlet.Core.Helpers.InstrumentationHelper.HasPdb(String module, Boolean& embedded)
at Coverlet.Core.Instrumentation.Instrumenter.CanInstrument() in //src/coverlet.core/Instrumentation/Instrumenter.cs:line 107
TpTrace Warning: 0 : 6332, 1, 2023/09/20, 21:26:41.391, 6181671645780, datacollector.exe, [coverlet]Unable to instrument module: 'C:\agent\devops_work\31\s\JusticeNext\CMIJustice.Tests\publish\AutoFixture.Xunit2.dll'
System.MissingMethodException: Method not found: 'System.Collections.Immutable.ImmutableArray1<System.Reflection.PortableExecutable.DebugDirectoryEntry> System.Reflection.PortableExecutable.PEReader.ReadDebugDirectory()'. at Coverlet.Core.Helpers.InstrumentationHelper.HasPdb(String module, Boolean& embedded) at Coverlet.Core.Instrumentation.Instrumenter.CanInstrument() in /_/src/coverlet.core/Instrumentation/Instrumenter.cs:line 107 TpTrace Warning: 0 : 6332, 1, 2023/09/20, 21:26:41.391, 6181671649294, datacollector.exe, [coverlet]Unable to instrument module: 'C:\agent\devops\_work\31\s\JusticeNext\CMIJustice.Tests\publish\AutoMapper.dll' System.MissingMethodException: Method not found: 'System.Collections.Immutable.ImmutableArray1<System.Reflection.PortableExecutable.DebugDirectoryEntry> System.Reflection.PortableExecutable.PEReader.ReadDebugDirectory()'.
at Coverlet.Core.Helpers.InstrumentationHelper.HasPdb(String module, Boolean& embedded)
at Coverlet.Core.Instrumentation.Instrumenter.CanInstrument() in //src/coverlet.core/Instrumentation/Instrumenter.cs:line 107
TpTrace Warning: 0 : 6332, 1, 2023/09/20, 21:26:41.391, 6181671652176, datacollector.exe, [coverlet]Unable to instrument module: 'C:\agent\devops_work\31\s\JusticeNext\CMIJustice.Tests\publish\Castle.Core.dll'
System.MissingMethodException: Method not found: 'System.Collections.Immutable.ImmutableArray`1<System.Reflection.PortableExecutable.DebugDirectoryEntry> System.Reflection.PortableExecutable.PEReader.ReadDebugDirectory()'.
at Coverlet.Core.Helpers.InstrumentationHelper.HasPdb(String module, Boolean& embedded)
Coverage files are created but are empty - no code cover results created
Configuration (please complete the following information):
Please provide more information on your .NET configuration:
* Which coverlet package and version was used? 6.0.1-preview.17.g473777 (had to use preview as 6.0.0 has issues and will not work)
* Which version of .NET is the code running on? .net 7
* What OS and version, and what distro if applicable? Azure Dev Ops on Windows Build Server
* What is the architecture (x64, x86, ARM, ARM64)? x86 / x64
* Do you know whether it is specific to that configuration? No.