I've seen so many posts around this, followed them, but I can't figure out my situation so can I ask for help:
I have a .Net Framework 4.7.2 Web Form Application that references two multi-targeted library assemblies, which both include the same version.
My web app references the Nuget Package System.Net.Http, Version=4.3.4.0, as do the other 43 projects in my solution, all referenced by the main Web App.
Those two multi-targeted libraries do not reference System.Net.Http of any version.
When I compile, I see a project reference of System.Net.Http v 4.2.0.0 added (probably from the .Net Framework 4.7.2 library itself)
I have an assembly bindingRedirect in my web config for 4.2.0.0 and newVersion of 4.3.4.0
However, when I compile, what ends up in the bin output folder says its 'Product version' and 'File version' is 4.7.3062.0,
so then I end up with the runtime exception:
[FileLoadException: Could not load file or assembly 'System.Net.Http' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)]
[FileLoadException: Could not load file or assembly 'System.Net.Http, Version=4.3.4.0, 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)]
I just don't know where that output folder version is even from because the NuGet version for .Net 4.7.2 only goes as high as 4.3.4.0.
It didn't work if I make a redirect to the 4.7.3062.0 version, and says it can't find that version
How can I get the correct 4.3.4.0 version to end up in the bin output folder so that the binding redirect can find it? Well, is that even correct, as the package directory for 4.3.4, in the \System.Net.Http.4.3.4\lib\net46 directory has version 4.6.26907.01 (??)