There’s a problem to your approach: .NET Standard is the most bare-bones implementation of .NET available, meaning that only basic features which are platform- and scenario-agnostic are implemented.
HttpContext exists on both the .NET Framework and .NET Core (both of which implement .NET Standard, by the way), but being specific to the Web, it does not exist on .NET Standard.
So, you have three options:
- Target the .NET Framework and use
- Target .NET Core and use
- Move the logic that uses
HttpContextaway from the .NET Standard project
Do notice, though, that those classes vary greatly. The .NET Core version was created for ASP.NET Core which is vastly different to ASP.NET 4.5 and olders.