是否可以在可移植类库中应用bindingRedirect,或者是否有替代方案?
使用此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>我正尝试在Windows8手机/桌面应用程序的PCL中使用此代码,但无法将app.config添加到项目中。System.Net.Http.Formatting引用了1.5.0.0版的System.Net.Http.Primitives
发布于 2015-05-11 18:31:30
原来我的项目目标是Windows8.1、Windows phone8.1和.NET 4.5。
当我删除dll4.5要求时,它开始使用引用的.NET中的System.Net.Http.Formatting版本,而不是尝试从.NET框架中使用它
https://stackoverflow.com/questions/30050766
复制相似问题