Could not load type 'System.Web.HttpContext' from assembly

I'm trying to use an AMF3 library called FlourineFx. Sending a HTTP request works fine, but when trying to decode the AMF package from the request response, I get this error:
Unhandled exception. System.TypeLoadException: Could not load type 'System.Web.HttpContext' from assembly 'System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
Unhandled exception. System.TypeLoadException: Could not load type 'System.Web.HttpContext' from assembly 'System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
17 Replies
Pobiega
Pobiega4mo ago
That library is 14 years old, fyi. It seems to target .NET Framework 4.0
UnemployedNinja
UnemployedNinja4mo ago
I know, but it's the only reliable library I can find :/ So I just need to install an earlier version of my stuff?
Pobiega
Pobiega4mo ago
Your project would need to target this too, unless you fork and upgrade the library yourself have you tried just exctracting the parts you need? https://github.com/jdecuyper/FluorineFx/tree/master/FluorineFx/AMF3 seems to contain the AMF3 stuff that might be all you need
UnemployedNinja
UnemployedNinja4mo ago
I haven't, but I also use a lot more than just what's in that folder
Pobiega
Pobiega4mo ago
¯\_(ツ)_/¯
UnemployedNinja
UnemployedNinja4mo ago
How do I make the project recognise the other .net versions I have installed
No description
Pobiega
Pobiega4mo ago
you have 4.0 right there, its the currently selected one
UnemployedNinja
UnemployedNinja4mo ago
I know, that's the library I'm using. I'm trying to build a new DLL with a newer version
Pobiega
Pobiega4mo ago
if you mean .NET 5+, those are not part of the .NET Framework lineage there was a complete rewrite of the entire runtime and base class library between 4 and 5 https://learn.microsoft.com/en-us/dotnet/core/porting/ might help you
UnemployedNinja
UnemployedNinja4mo ago
I installed an upgrade qizzard and it seems to be doing what I want
Pobiega
Pobiega4mo ago
but more than likely it will be a lot of work porting it
UnemployedNinja
UnemployedNinja4mo ago
It's upgrading the project to .NET 8 Basically doesn't help much because most of the things are outdated for 8
Pobiega
Pobiega4mo ago
Yup. 14 years is a very long time
FusedQyou
FusedQyou4mo ago
Also targetting .NET Framework is bad because it has been out of support for a while, especially the version you target. I suggest you try to figure out what it is that you need and find an alternative or somehow support the existing project
UnemployedNinja
UnemployedNinja4mo ago
It's ok, I've been saved
UnemployedNinja
UnemployedNinja4mo ago
GitHub
GitHub - HavenDV/fluorinefx: fluorinefx with latest .Net support
fluorinefx with latest .Net support. Contribute to HavenDV/fluorinefx development by creating an account on GitHub.
UnemployedNinja
UnemployedNinja4mo ago
Someone added support for .NET 8 and it's recently updated 🙏