1
是否有可能在便携式类库来应用bindingRedirect或者是有其他选择吗?绑定重定向便携式类库
我们有一个PCL引用其他PCL使用System.Net.Http.Formatting(5.2.3.0)和System.Net.Http.Primitives(4.2.22.0)。使用这种PCL目前的代码是使用以下绑定重定向:
<?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>
我想在PCL使用此代码对Windows 8的电话/桌面应用,但不能一个app.config添加到项目。 System.Net.Http.Formatting有一个引用System.Net的版本1.5.0.0.Http.Primitives