C#C
C#3y ago
9 replies
leleco

❔ Exception trying to run code from a .NET Framework 4.5.2 on .NET 6 project

Hi,

I have a new project using .NET 6, but I need to call a method in a project using .NET Framework 4.5.2. Per company policies I don't have rights to upgrade this project, so I have to use it as it is.

When trying to call a method from this old project, I keep getting this runtime exception:

System.TypeLoadException
  HResult=0x80131522
  Message=Could not load type 'System.Web.HttpRuntime' from assembly 'System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.

Been trying to search for a solution, but no luck so far.
Thanks!
Was this page helpful?