加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

twitter – Newtonsoft.Json依赖问题

发布时间:2020-12-16 18:41:40 所属栏目:百科 来源:网络整理
导读:我的项目使用Newtonsoft.json V4.5.现在我需要将twitter oAuth集成到我的项目中. 我决定使用Tweetsharp.dll进行集成.想知道Newtonsoft.Json的依赖冲突问题,Tweetsharp需要Newtonsoft.json 3.5. 问题是我不能从我的项目中替换我的新版本的Newtonsoft.Json,因
我的项目使用Newtonsoft.json V4.5.现在我需要将twitter oAuth集成到我的项目中.

我决定使用Tweetsharp.dll进行集成.想知道Newtonsoft.Json的依赖冲突问题,Tweetsharp需要Newtonsoft.json 3.5.

问题是我不能从我的项目中替换我的新版本的Newtonsoft.Json,因为它会影响其他功能.

请帮我解决这个问题.

Server Error in '/' Application.

 Could not load file or assembly 'Newtonsoft.Json,Version=3.5.0.0,Culture=neutral,PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

  Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

  Exception Details: System.IO.FileLoadException: Could not load file or assembly 'Newtonsoft.Json,PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

 Source Error: 


 Line 188:            if (CallbackUrl != null && CallbackUrl.Trim().Length > 0)
 Line 189:            {
 Line 190:                twitter =     FluentTwitter.CreateRequest().Configuration.UseHttps().Authentication.GetRequestToken(ConsumerKey,ConsumerSecret,CallbackUrl);
 Line 191:            }
 Line 192:            else

 Source File: C:UsershnarikkodenDesktopSocxoB2App_StartTwitterInfo.cs    Line: 190 

  Assembly Load Trace: The following information can be helpful to determine why the   assembly 'Newtonsoft.Json,PublicKeyToken=30ad4fe6b2a6aeed' could not be loaded.

解决方法

你无法参考这两个库,所以你最好的方法是:

– 编辑TweetSharp项目,因为它是开源的,并尝试自己“升级”它

– 在TweetSharp Github上发布问题并要求更新

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读