question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

EasyNetQ.DI.Microsoft cannot be used in Asp.Net Core 2.1 project

See original GitHub issue

Hi,

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:closed
  • Created 3 years ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
sungam3rcommented, Nov 5, 2020

@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 on netstandard2.0 so it is “runtime agnostic”.

Read more comments on GitHub >

github_iconTop Results From Across the Web

After upgrading to ASP.NET Core 2.1, get error that project ...
Here is the error I receive when I build the application after upgrading to 2.1, The project was restored using Microsoft.NETCore.
Read more >
EasyNetQ.DI.Microsoft 7.5.5
Version Downloads Last updated 8.0.0‑beta94 112 2 months ago 8.0.0‑beta93 70 2 months ago 8.0.0‑beta92 61 2 months ago
Read more >
Net Core 2.1 won't startup because Microsoft.AspNetCore. ...
Yeah, the package is no longer available for .NET Core 2.1 You'll have to remove it to get the project to build. Details...
Read more >
NET Core 2.1 will reach End of Support on August 21, 2021
NET Framework. .NET Core 2.1 will be reaching end of support on August 21, 2021. After this date, Microsoft will no longer provide...
Read more >
Migrate from ASP.NET Core 2.0 to 2.1
This article covers the basics of migrating an ASP.NET Core 2.0 app to 2.1.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found