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?
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With