I am trying to migrate some old API to .net 6. I am using for that new System.Web adapters.
Just to verify when I use HttpContext.Current in .net 6 API project everything is fine.
Problem is that one of the older class library projects is using HttpContext.Current and referencing System.Web. I removed System.Web reference, added reference to Microsoft.AspNetCore.SystemWebAdapters. I cleaned project, deleted bin/obj folders. But when I debug, it is still always trying to load System.Web library instead of Microsoft.AspNetCore.SystemWebAdapters. Even Visual studio when I navigate to HttpContext implementation inside older class library project points me to System.Web. Target framework of class lib is net472.
Any suggestions what else can be done?