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
In package manager console Visual Studio 2013
PM> Install-Package Newtonsoft.Json
Then restart Visual Studio.
I had the same problem with my Xamarin.Forms PCL WinPhone8.1 project after upgrading all NuGet packages for the solution. The problem was with Newtonsoft.Json v9.0.0 in the winPhone8.1 project.
All other projects worked correctly. Spent two days trawling all advice and finally resolved the problem by deleting the project, pulling a clone of the project from my git and adding back into the solution. Still failed (although the git version worked fine before the commit.)
Deleted reference for Newtonsoft, reinstalled the old version 8.0.3, then upgraded via NuGet to V9.0.0.
Then deleted all references to Newtonsoft from the winPhone8.1 project Bin/ARM/Debug, Bin/x86/Debug and Obj/ARM/Debug/MSIL and MDIL directories. Did a build and SUCCESS.
I'm guessing you donwloaded Newtonsoft.Json v4.0, not 3.5. Last version of 3.5 is release 8.
http://json.codeplex.com/releases/view/50552
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.
You can update it with its nuget package 'Newtonsoft.Json' using the package manager.
PM> update-package newtonsoft.json
PM> update-package newtonsoft.json It works
When I ran into this problem, I found that there were 2 similar folders in yourproject/packages, one is version 6.0.5, another is 5.0.6.
I deleted the 5.0.6 and the problem disappeared.