JsonSerializer例外与Facebook C#SDK
问题描述:
,我发现了错误:JsonSerializer例外与Facebook C#SDK
"The type initializer for
'Facebook.JsonSerializer'
threw an exception."
有更具体的错误:
"Could not load file or assembly
'Newtonsoft.Json, Version=4.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed'
or one of its dependencies. The system cannot find the file specified"
答
好吧,我发现这个问题,所以在这里也适用于有任何人问题:
您需要Newtonsoft JSON库,你可以从以下网址下载:
http://json.codeplex.com/Release/ProjectReleases.aspx
我用Newtonsoft.Json.dll在网目录。
在发布问题之前,我实际上已经知道这个答案,但我认为答案会帮助其他人遇到同样的问题。看着我的原始异常的InnerException异常回答了我的问题:)
+0
更新,多年后:通过NuGet安装:) – 2017-05-28 21:25:07
如果您提供更多关于您尝试导致该错误的更多信息,您可能会收到更多回复。简单地粘贴错误消息通常不会激励人们查看您的问题。 – 2011-03-15 17:53:40
添加到存储库以帮助其他人...不期待长链评论:) – 2011-05-01 03:46:53