JSON反序列化异常(急)

ch5201314zt 2010-07-27 03:00:08
大概异常信息如下:
ex = {"“Newtonsoft.Json.Serialization.DefaultContractResolver”的类型初始值设定项引发异常。"}

详细异常信息如下:
{System.TypeInitializationException: “Newtonsoft.Json.Serialization.DefaultContractResolver”的类型初始值设定项引发异常。 ---> System.IO.FileNotFoundException: 未能加载文件或程序集“System.Core, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e”或它的某一个依赖项。系统找不到指定的文件。
文件名:“System.Core, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e”
在 Newtonsoft.Json.Serialization.DefaultContractResolver..ctor()
在 Newtonsoft.Json.Serialization.DefaultContractResolver..cctor()

=== 预绑定状态信息 ===
日志: 用户 = zhang-PC\Administrator
日志: DisplayName = System.Core, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
(Fully-specified)
日志: Appbase = file:///C:/Users/Administrator/Desktop/ICServerProject/ICServerProject/IcServer/bin/Debug/
日志: 初始 PrivatePath = NULL
调用程序集: Newtonsoft.Json.Silverlight, Version=3.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed。
===
日志: 此绑定从 default 加载上下文开始。
日志: 未找到应用程序配置文件。
日志: 使用 C:\Windows\Microsoft.NET\Framework\v2.0.50727\config\machine.config 的计算机配置文件。
日志: 策略后引用: System.Core, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
日志: 试图下载新的 URL file:///C:/Users/Administrator/Desktop/ICServerProject/ICServerProject/IcServer/bin/Debug/System.Core.DLL。
日志: 试图下载新的 URL file:///C:/Users/Administrator/Desktop/ICServerProject/ICServerProject/IcServer/bin/Debug/System.Core/System.Core.DLL。
日志: 试图下载新的 URL file:///C:/Users/Administrator/Desktop/ICServerProject/ICServerProject/IcServer/bin/Debug/System.Core.EXE。
日志: 试图下载新的 URL file:///C:/Users/Administrator/Desktop/ICServerProject/ICServerProject/IcServer/bin/Debug/System.Core/System.Core.EXE。

--- 内部异常堆栈跟踪的结尾 ---
在 Newtonsoft.Json.JsonSerializer.get_ContractResolver()
在 Newtonsoft.Json.Serialization.JsonSerializerInternalReader.GetContractSafe(Type type)
在 Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType)
在 Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
在 Newtonsoft.Json.JsonSerializer.Deserialize(JsonReader reader, Type objectType)
在 Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
在 Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
在 Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value)
在 IcServer.GetBSMsg.ClientReceiveComplete(IAsyncResult async) 位置 C:\Users\Administrator\Desktop\ICServerProject\ICServerProject\IcServer\GetBSMsg.cs:行号 263}

哪位大侠知道?指点下
...全文
698 7 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
jv9 2010-07-28
  • 打赏
  • 举报
回复
[Quote=引用 2 楼 ch5201314zt 的回复:]
来个人接分,自己搞定了,是包引用错了
[/Quote]

恭喜楼主问题解决。

感谢分享经验。 :)
Joetao 2010-07-27
  • 打赏
  • 举报
回复
无意中看到一篇文章!希望对楼主有用
http://www.cnblogs.com/yjmyzz/archive/2010/02/22/1671513.html
Joetao 2010-07-27
  • 打赏
  • 举报
回复
没弄过!来接分!
Sunpire 2010-07-27
  • 打赏
  • 举报
回复
从不用JSON,格式太简单了,不过也来接分了哈哈
badi888 2010-07-27
  • 打赏
  • 举报
回复
来接分了 呵呵。。。
ch5201314zt 2010-07-27
  • 打赏
  • 举报
回复
来个人接分,自己搞定了,是包引用错了
ch5201314zt 2010-07-27
  • 打赏
  • 举报
回复
有人知道不 ?》

8,758

社区成员

发帖
与我相关
我的任务
社区描述
WPF/Silverlight相关讨论
社区管理员
  • WPF/Silverlight社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧