I am running this bit of code:
string serialized = JsonConvert.SerializeObject(somethingToSend);
And it throws this exception:
So I needed to RTFM! The readme file says:
Microsoft stopped support for the Compact Framework in Visual Studio 2010. For a Compact Framework 3.5 build download Json.NET 3.5.
So I grabbed the most recent 3.5 version which is: Json.NET 3.5 Release 8, updated my reference to point to the Newtonsoft.Json.Compact.dll
assembly, ran it and it worked fine.