✅ Strange version error with EF.Core

I have a third party exe that references assembly CTSCore.dll. It seems to run fine, and when I examine the DLL I see it has a reference to Microsoft.EntityFrameworkCore.8.0.2.0, yet in the bin folder of the app I see Microsoft.EntityFrameworkCore.8.0.424.16902. Yet when I reference CTSCore in my web api and call a method on one of its classes, I get a FileNotFoundException looking for Microsoft.EntityFrameworkCore.8.0.2.0.

  1. How is the exe running while my web api is failing? Looks to me like it should also be causing an exception when EFCore.8.0.2.0 isn't found. I suspect it might be a difference in how the two executables use assembly versions. I don't see why a WinForms app should be different from a Console app though, and the web api is a console app.
  2. How can I insulate myself from this?
Was this page helpful?