1

I'm updating my solution to target .NET Framework 4.8. As part of this process, Visual Studio 2019 updated my Web.config binding redirects for System.Net.Http from 4.0.0.0 to 4.2.0.0. This made sense.

However, when I try to load my application in IIS, it fails trying to find System.Net.Http version 4.2.0.0.

I've discovered this is because the assembly version of System.Net.Http in C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8 is 4.2.0.0 (file version 4.8.3761.0) whereas the assembly version of System.Net.Http in C:\Windows\Microsoft.NET\Framework64\v4.0.30319 is 4.0.0.0 (file version 4.8.3752.0).

When I manually revert my Web.config binding redirect to 4.0.0.0 instead of 4.2.0.0, my web application works. However, I don't want to do that.

How do I update the Windows copy of .NET Framework 4.8 so it's in sync with Visual Studio? I've installed all the latest Windows 10 updates, but it's not clear how to do this.

Matthew Rodatus
  • 1,393
  • 9
  • 18
  • 1
    Fixing the bindingRedirect is as yet the only known workaround. [More here](https://stackoverflow.com/questions/47570912/strange-issue-with-system-net-http-4-2-0-0-not-found/48862675#48862675). – Hans Passant Nov 05 '19 at 16:51
  • Does this answer your question? [Use latest version of System.Net.Http in .Net Framework](https://stackoverflow.com/questions/57803285/use-latest-version-of-system-net-http-in-net-framework) – Jim G. Mar 06 '20 at 15:29

0 Answers0