EasyNetQ.DI.Microsoft cannot be used in Asp.Net Core 2.1 project
See original GitHub issueHi,
I am trying to use EasyNetQ
in Asp.Net Core 2.1 project together with EasyNetQ.DI.Microsoft
.
Unfortunately, I cannot add EasyNetQ.DI.Microsoft
to Asp.Net Core 2.1 project since it depends on Microsoft.Extensions.DependencyInjection v2.2.0
which conflicts with Microsoft.AspNetCore.App v2.1.*
.
Here’s an error I’m getting:
NU1107: Version conflict detected for Microsoft.Extensions.DependencyInjection. Install/reference Microsoft.Extensions.DependencyInjection 2.2.0 directly to project EasyNetQ.AspNetCore2_1 to resolve this issue.
EasyNetQ.AspNetCore2_1 -> EasyNetQ.DI.Microsoft 6.0.1 -> Microsoft.Extensions.DependencyInjection (>= 2.2.0)
EasyNetQ.AspNetCore2_1 -> Microsoft.AspNetCore.App 2.1.1 -> Microsoft.Extensions.DependencyInjection (>= 2.1.1 && < 2.2.0).
I did a bit of digging and seems like this behavior was changed in the version 3.7.0 where Microsoft.Extensions.DependencyInjection
was upgraded from 2.1.0 to 2.2.0.
Both EasyNetQ and EasyNetQ.DI.Microsoft target netstandard2.0, so I wonder if the drop of Asp.Net Core 2.1 was intentional.
There is a workaround of re-implementing the code of EasyNetQ.DI.Microsoft
in projects that target Asp.Net Core 2.1 but having support in the official package would be nice.
P.S. Thanks for maintaining this awesome library.
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (6 by maintainers)
Top GitHub Comments
https://www.nuget.org/packages/EasyNetQ/6.0.3
@Pliner I suggest to downgrade dependency. This is a common problem and I have encountered it many times. You can reference the minimum required version and the consumer (2.1, 2.2, 3.0, 3.1, whatever) will upgrade it based on their needs.
EasyNetQ.DI.Microsoft
is targeted onnetstandard2.0
so it is “runtime agnostic”.