Posts

Showing posts from November, 2017

System.Net.Http dll version problems

Last few weeks we had problems with referencing the correct System.Net.Http version. This is probably because some components use internally higher versions (.NET Core with System.Net.Http 4.2.0.0) compared to the versions that are available in NuGet. Frequently we got errors like: Could not load file or assembly 'System.Net.Http, Version=4.1.1.2, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) What is the solution.... That is a great questions. But we do not have the satisfying answer yet. What we currently do is the following. - Use in all projects the same System.Net.Http version, currently we use v4.3.3 from nugget - Compile the code and check in the resulting Bin folder what the resulting System.Net.Http version is - Use this version as BindingRedirect in the app.config / web.config like <dependentAssembly>...