I have a .NET 7 Blazor helper library which has been referencing HttpContext
from the Microsoft.AspNetCore.Http.Abstractions (2.2.0)
nuget. However, this nuget is now flagged as deprecated by Microsoft, thus the Visual Studio Nuget manager shows me warnings for this package reference.
But my .Net7 Blazor app is using Microsoft.AspNetCore.Components.Web (7.0.5)
and the root razor page _Host.cshtml
exposes the HttpContext
property, which I need to pass to a helper method in the above mentioned project.
What am I missing here? If I Browse my way to the HttpContext
definition from _Host.cshtml
, Visual Studio claims it's declared in Microsoft.AspNetCore.Http.Abstractions (7.0.0.0)
, which is nowhere to be found?
I also have similar issues with other, related packages. What's the correct way to reference these packages, without warnings? Or what other packages am I to use?