gpt4 book ai didi

twitter - Newtonsoft.Json 依赖问题

转载 作者:行者123 更新时间:2023-12-02 16:08:00 25 4
gpt4 key购买 nike

我的项目使用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, 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)

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:\Users\hnarikkoden\Desktop\Socxo\B2\App_Start\TwitterInfo.cs Line: 190

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

最佳答案

您无法引用这两个库,因此您最好的选择是:

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

-将问题发布到 TweetSharp Github并要求更新

关于twitter - Newtonsoft.Json 依赖问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15541543/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com