I've solved the issue by removing packages that I've manually added to resolve vulnerabilities.
These 2 packages (System.Net.Http and System.Text.RegularExpressions) are referenced by a root package for which there's no update yet. I've added the packages directly to resolve the vulnerabilities which it did but then I've hit the "function can't be invoked"