以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  [求助]发布时报错, 编译错误:项目当前包含对 Newtonsoft.Json 的多个版本的引用  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=137401)

--  作者:rambowhuang
--  发布时间:2019/7/4 22:35:00
--  [求助]发布时报错, 编译错误:项目当前包含对 Newtonsoft.Json 的多个版本的引用
发布时报错
编译错误:项目当前包含对 Newtonsoft.Json 的多个版本的引用: 一个对版本 10.0.0.0 的直接引用,,
以及一个(通过“HttpFunctions.CompressJson”)对版本 12.0.0.0 的间接引用。
请更改直接引用以使用 Newtonsoft.Json 的版本 12.0.0.0 (或更高版本)。

错误代码:dr("jsonString")=CompressJson(jo).ToString \'//压缩一下,再保存

请教老师,

1:错误代码:dr("jsonString")=CompressJson(jo).ToString \'//压缩一下,再保存
如何在内部函数中快速找到这行代码呢?

2:Newtonsoft.Json 是系统预设的,我并没有自己添加引用。 

--  作者:有点蓝
--  发布时间:2019/7/5 9:08:00
--  
要这样处理
1、Newtonsoft.Json.dll还是使用回Foxtable原来的版本
2、Foxtable安装目录里有一个文件是:Foxtable.exe.config,修改里面的内容加上下面红色一段,黑色内容是原来就有的

……
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="C1.C1Zip.4"
          publicKeyToken="79882d576c6336da"
          culture="neutral" />
        <bindingRedirect oldVersion="4.0.20191.359" newVersion="4.0.20183.338" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="C1.Win.Bitmap.4"
          publicKeyToken="944ae1ea0e47ca04"
          culture="neutral" />
        <bindingRedirect oldVersion="4.0.20183.338" newVersion="4.0.20191.359" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="C1.C1Excel.4"
          publicKeyToken="79882d576c6336da"
          culture="neutral" />
        <bindingRedirect oldVersion="4.0.20191.359" newVersion="4.0.20183.338" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="Newtonsoft.Json"
          publicKeyToken="30ad4fe6b2a6aeed"
          culture="neutral" />
        <bindingRedirect oldVersion="10.0.0.0" newVersion="12.0.0.0" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
……

--  作者:zhenghangbo
--  发布时间:2020/10/19 19:11:00
--  
为什么加了红色的那段代码还是同样的错误。
--  作者:有点蓝
--  发布时间:2020/10/19 20:09:00
--  
重装foxtable,然后重新改Foxtable.exe.config。注意不要复制其它版本的Newtonsoft.Json.dll覆盖默认的Newtonsoft.Json.dll
[此贴子已经被作者于2020/10/19 20:09:57编辑过]