开发者

Newtonsoft.Json mismatch in FacebookWebMVC NuGet package?

After loading the Facebook C# SDK (Faceb开发者_开发技巧ookWebMVC) library from NuGet, I followed exactly the steps at this (excellent!) walkthrough Getting Started with an ASP.NET MVC 3 Website.

I've got my own FB key/secret, implemented the 3 classes in the tutorial, but have this error:

Could not load file or assembly 'Newtonsoft.Json, Version=4.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed ....

WRN: Comparing the assembly name resulted in the mismatch: Build Number

Occurs on this line:

var loginUri = oAuthClient.GetLoginUrl(new Dictionary<string, object> 
               { { "state", returnUrl } });

Note the 4.0.0.0. Rather on disk is 4.0.2.0; this came bundled in the NuGet package. This file is copied, as expected to my project's bin dir. Version 4.0.2.13622

d:\myproj\packages\Newtonsoft.Json.4.0.2\lib\net40-full\Newtonsoft.Json.dll

How can this be solved?


You need to download release 1 instead of release 2 of the Newtonsoft.Json.


I've been having this problem today as well. I removed the NuGet packages entirely, used a copy of Newtonsoft.Json.WindowsPhone.dll that I downloaded from the NewtonSoft.Json download page, and I'm using a copy of Facebook.dll that I built here. I don't think you need to build Facebook.dll, it was just that I did that during the course of trying to get somewhere with this problem today.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜