coverlet-coverage / coverlet

Cross platform code coverage for .NET
MIT License
2.97k stars 386 forks source link

Upgrade to .net core 6.0.10 and Microsoft.Extensions.DependencyInjection 6.0.1 caused to stop coverlet #1394

Closed MarcoK80 closed 1 year ago

MarcoK80 commented 1 year ago

Upgrade to .net core 6.0.10 and Microsoft.Extensions.DependencyInjection 6.0.1 caused to stop coverlet.collector 3.1.2

Starting test execution, please wait... A total of 1 test files matched the specified pattern. Data collector 'XPlat code coverage' message: [coverlet]System.TypeLoadException: Could not load type 'Microsoft.Extensions.DependencyInjection.ServiceCollection' from assembly 'Microsoft.Extensions.DependencyInjection, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. at Coverlet.Collector.DataCollection.CoverletCoverageCollector.GetDefaultServiceCollection(TestPlatformEqtTrace eqtTrace, TestPlatformLogger logger, String testModule) at Coverlet.Collector.DataCollection.CoverletCoverageCollector.OnSessionStart(Object sender, SessionStartEventArgs sessionStartEventArgs) in /_/src/coverlet.collector/DataCollection/CoverletCoverageCollector.cs:line 132.

Tried to reference and it doesnt help

petli commented 1 year ago

This is probably the same issue as #1390