Is it possible to apply a bindingRedirect in a Portable Class Library or is there an alternative?
We have a PCL that references another PCL that uses System.Net.Http.Formatting (5.2.3.0) and System.Net.Http.Primitives (4.2.22.0). The current code using this PCL is using the following binding redirect:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Net.Http.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-4.2.22.0" newVersion="4.2.22.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
I am trying to use this code in a PCL for a Windows 8 Phone/Desktop app, but can't add an app.config to the project. System.Net.Http.Formatting has a reference to version 1.5.0.0 of System.Net.Http.Primitives