无法加载文件或程序集“Newtonsoft.Json,版本= 3.5.0.0 [英] Could not load file or assembly 'Newtonsoft.Json, Version=3.5.0.0

查看:1056
本文介绍了无法加载文件或程序集“Newtonsoft.Json,版本= 3.5.0.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在C#4.0的工作来读取签名的请求,我用下面的代码

I am working in c# 4.0 to read a signed request I am using the following code

FacebookApp fap = new FacebookApp();
fap.AppId = "789485219211963"; // App ID
fap.AppSecret = "365ee9f5823698536767d608cf572a49"; 

string requested_Data = Request.Form["signed_request"];
FacebookSignedRequest fsr = fap.ParseSignedRequest(requested_Data);
IDictionary<string, string> myDic = fsr.Dictionary;

string name = myDic["name"];
string algorithm = myDic["algorithm"];

Response.Write(requested_Data + "<br>" + algorithm + "<br>" + name + "<br>");



但在突出显示的行,我收到以下异常

But on the highlighted line I received following exception

无法加载文件或程序
'Newtonsoft.Json,版本= 3.5.0.0,
区域性=中性,
公钥= 30ad4fe6b2a6aeed'或
它的一个依赖。在位于
集清单定义做
不匹配程序集引用。
(从HRESULT异常:0x80131040)

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)

我下载Newtonsoft.Json。第1版,而不是释放2,但它仍然没有工作。
能有人好心帮我解决这个问题,还请指导我或者我的阅读签名的请求是正确的做法与否,如果不是请说明正确的方法。

I downloaded Newtonsoft.Json. release 1 instead of release 2 but it still not working. Can someone kindly help me to solve this problem, also please guide me either my way of reading signed request is correct or not if not please specify the correct way.

感谢:

推荐答案

我猜你donwloaded Newtonsoft.Json V4.0,而不是3.5。 3.5最新版本是版本8中。

I'm guessing you donwloaded Newtonsoft.Json v4.0, not 3.5. Last version of 3.5 is release 8.

的http:// JSON .codeplex.com /发行/查看/ 50552

我猜你可能能在你的web.config / app.config中做一个版本向前为了使用4.0而不是3.5,因为你使用的是一些图书馆对3.5版本Newtonsoft的可能是建造的。

I guess that you might be able to do a version forward in your web.config/app.config in order to use 4.0 instead of 3.5, because some library you are using is probably built against the 3.5 version of Newtonsoft.

这篇关于无法加载文件或程序集“Newtonsoft.Json,版本= 3.5.0.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆