System.Web.Http is missing in my .net core 2.1 project.
the error states
Error CS0234 The type or namespace name 'Http' does not exist in the namespace 'System.Web' (are you missing an assembly reference?)
please refer the image for more clarity
NET Core 2.1 and . NET Core 3.1 are long-term support versions, which means they're supported for 3 years after release. This is explained in the . NET Core Support Policy.
ASP . NET Core does not support System. Web. dll but supports a collection of granular and well factored NuGet packages.
NET Core 2.2 is no longer supported and updates will no longer be provided. We recommend moving to . NET Core 3.1, our long term support (LTS) release.
Starting with . NET Core 3.1, end of life dates will align with Microsoft Patch Tuesday (second Tuesday of each month). For example, . NET Core 3.1 was originally released on December 3, 2019 and is supported for three years.
System.Web.Http is not available in dotnet core, but may be referenced by installing the following nuget package: Microsoft.AspNetCore.Mvc.WebApiCompatShim.dll. This will clear the error.
Source: https://docs.microsoft.com/en-us/dotnet/api/system.web.http.httperror?view=aspnetcore-2.1
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