Issue with System.Net.Http 4.2.0.0 not found

By | 13. May 2019

Recently I got next error when executing application on remote server:

 

On local PC all worked fine. Same version of .net framework was installed on local development pc and remote.

There are huge amount of posts about this topic in internet.

The root issue of issue was found out soon – full framework application was using standard framework library what contained HTTP related functions. There are several observations how this will lead to references to two different versions of library.

I had no intentions move this functionality to main application, so investigation continued. Did try out several options without any luck. Finally restored original source code from version control and went for suggestion to migrate packages.config to PackageReference. After that removed references to System.Net.Http and added nuget package System.Net.Http to projects it was present.

 

And this was it, all is running smoothly now.

 

 

Leave a Reply