After loading the Facebook C# SDK (FacebookWebMVC) 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.