3

I've 3 projects A,B and C where A and B is .netcore class library and C is WPF (.netcore).

In project A Pomelo.EntityFrameworkCore.MySql a nuget packge is installed which has the dependency on Microsoft.EntityFrameworkCore.Relational (>= 3.1.0)

and in project B Oracle.EntityFrameworkCore is installed which has the dependency on Microsoft.EntityFrameworkCore.Relational (>= 2.1.11 && < 3.0.0)

Both project A and B are referenced in project C but since both project has dependency on same assembly different version it won't compile.

I've also followed this guide but since there is no App.config in .netcore it's not working for me.

Here's the demo project on github

Uzair Ali
  • 510
  • 14
  • 32

1 Answers1

0

From here:

Binding redirects are a .NET framework concept, there are no binding redirects on .NET Standard and .NET Core.

Your package1 (Pomelo.EntityFrameworkCore.MySql) clearly says that it needs v3.1.0 or higher of some assembly to work correctly. And package2 (Oracle.EntityFrameworkCore) says that it will not work if version of same assembly is 3.0.0 or greater.

By forcing your app to use one versions of package (assembly redirects), you going to break one of this packages. Which one you want to kill? Kill it manually by removing it from your app :)

Did you tried to use Pomelo.EntityFrameworkCore.MySql v.2.2.6 - it needs Microsoft.EntityFrameworkCore.Relational (>= 2.2.6) ?

Dmitry
  • 16,110
  • 4
  • 61
  • 73
  • I wan't to use both package at the same time but I don't know how that's the actual problem. `Pomelo.EntityFrameworkCore.MySql v.2.2.6` is missing some features which I required like it can't scaffold `views`. – Uzair Ali Feb 22 '20 at 16:00