We found a different solution to a problem with the same symptom:
We saw this error when we updated the project from .net 4.7.1 to 4.7.2.
The problem was that even though we were not referencing System.Net.Http any more in the project, it was listed in the dependentAssembily section of our web.config. Removing this and any other unused assembly references from the web.config solved the problem.