I have a PCL core project here with a class that wants an HttpMessageHandler instance for initialization.
On iOS, I pass a "new CFNetworkHandler()". The iOS project references System.Net.Http 188.8.131.52 from Mono.
The core project references Microsoft.Net.Http 2.2.18 from NUget.
All builds. However if I run the iOS project I get a runtime exception:
System.TypeLoadException: Could not load type 'System.Net.Http.CFNetworkHandler' from assembly 'Client_iOS'.
During build I see this warning:
Warning 3 Found conflicts between different versions of the same dependent assembly. Please set the "AutoGenerateBindingRedirects" property to true in the project file. For more information, see http://go.microsoft.com/fwlink/?LinkId=294190. Client_iOS
If I remove the Microsoft.Net.Http package from the core lib and try to add it back, I get an error that the selected target frameworks iOS and Android are not supported. I can change my project settings and remove these targets, add the package and set the targets again but them I'll get the same error as above again.
How can I get things right?