I have a class library that offers some reusable sugar for EntityFrameworkCore, and it currently targets netstandard2.0;netstandard2.1.
I have projects that reference this class library, most of which target netcore, but a few of which target net48.
Updating reference to net50 and EFCore 5.0, I discovered that EFCore 5.0 no longer supports targeting netstandard2.0 / net48.
If I wish to have my class library consumed by both net48 and net50, I believe I must either:
- limit
Microsoft.EntityFrameworkCorepackages to version prior to 5.0 (version=[3.1.10,5.0)), or - create two libraries:
- one of which targets
netstandard2.0and references EFCore3.1.10 - the other targets
netstandard2.1and references EFCore5.0
- one of which targets
Is there a way to have a single library build to netstandard2.0 referencing EFCore 3.1.10, and netstandard2.1 referencing EFCore 5.0.
I assume this is not practical, and the "right" answer is two distinct libraries.