我正在使用专有的CMS,并尝试为YouTube添加Google API。
CMS需要Newtonsoft.Json 4.5。 Google的API .NET需要Newtonsoft.Json 10.0。
我曾尝试为YouTube上传建立一个单独的“网页”并将其放入iFrame中,但这会将其从我的表单中删除。我没有看到这样做的有效方法。
我可以以某种方式为专有CMS提供所需的文件(并附带),同时为Google API提供所需的文件吗?
答案 0 :(得分:1)
您不需要使用2个不同版本的Newtonsoft.Json
。相反,您可以使用assembly binding redirects强制您的依赖项使用相同的版本。
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30AD4FE6B2A6AEED" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-11.0.1.0" newVersion="11.0.1.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>