Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Assembly Microsoft.AspNetCore.Http version 3.0.0.0 Conflict with 2.2.0.0

I need to create an IAuthorizationFilter in my application, which is targeting .NET Core 3.0.

I needed a reference to Microsoft.AspNetCore.Http.DefaultHttpContext. That lives in the Microsoft.AspNetCore.Http namespace.

When I added the NuGet for Microsoft.AspNetCore.Http, I got an error saying that assembly 'Microsoft.AspNetCore.Mvc.Abstractions' with version 3.0.0.0 conflicted with 'Microsoft.AspNetCore.Http.Abstractions' with version 2.2.0.0.

When I looked, the NuGet I installed was version 2.2.0. But the problem is that there is not one for version 3.0 on NuGet.

How can I get a reference to Microsoft.AspNetCore.Http.DefaultHttpContext using .NET Core 3.0?

like image 288
Vaccano Avatar asked Dec 07 '25 14:12

Vaccano


1 Answers

You need to add a framework reference to asp.net core. See the migration guide docs for details See the migration guide docs for details

like image 137
Omar AMEZOUG Avatar answered Dec 11 '25 05:12

Omar AMEZOUG



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!