程序集里包含多个版本dll引用 ,强制低版本到制定版本dll引用

在 config 的 <configuration> 节点内加入以下 类似信息

以下是以Newtonsoft.Json 为例子

<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>

原文地址:https://www.cnblogs.com/Zoes/p/5633958.html