Could not load type 'Microsoft.EntityFrameworkCore.Internal.ProductInfo' error in EF Core

Viewed 244

I have a .NET Core 3 project thats been working fine for version 3.1.8 of EF Core

I cant see any changes made that could cause this but now I get the error

Could not load type 'Microsoft.EntityFrameworkCore.Internal.ProductInfo' from assembly 
'Microsoft.EntityFrameworkCore, Version=3.1.8.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'

This is a really frustrating issue that I have no idea how to resolve

I have checked, and I dont have any version mismatches everything is on 3.1.8.0

Most of the help around this issue relates to version mismatches

It is not an option to upgrade Ef Core

Can someone help please?

Paul

1 Answers

Ok I fixed this but its really subtle

Turns out that I had to have the hosting project for the context set as the startup project for the solution! Once this was done it worked fine! Really astrange!

Related