question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeLoadException error (DependencyInjection) with latest EFCore

See original GitHub issue

Hi,

I noticed that if I upgrade my EF Core libraries to latest (6.0.10), I get an error with coverlet:

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.

I’m trying to upgrade Microsoft.EntityFrameworkCore from 6.0.9 to 6.0.10. My project is latest .NET 6.

Is this happening to anyone else? Is there a fix?

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:13
  • Comments:27

github_iconTop GitHub Comments

13reactions
MarcoRossignolicommented, Oct 29, 2022

3.2.0 released

6reactions
MarcoRossignolicommented, Oct 27, 2022

By the end of the week I should be able to release a minor release

Read more comments on GitHub >

github_iconTop Results From Across the Web

Type Load Exception in EF Core Project
I get this error: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. System.
Read more >
ASP.NET Core 3.1.0 site won't run - Could not load ...
The solution would be to downgrade the Microsoft.AspNetCore.Identity nuget package to 3.1.0 instead of 3.1.1 then the error should go away. Good ...
Read more >
Problems about upgrade .net5 to .net6 RC
I have a site only for the reading database from MySQL. Now I am about to upgrade it from .net 5 to .net6...
Read more >
Asp.net-core – System.TypeLoadException Could not load ...
Extensions.DependencyInjection.ServiceCollectionExtensions'. asp.net-coreasp.net-core-mvc. I am getting this error: Error when call "services.
Read more >
Could not load type 'Microsoft.AspNetCore.Mvc.Internal. ...
Creating the new project in Visual Studio 2019 using Asp.net Core 3.1.....I am facing this issue Some services are not able to be...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found