JSON.NET with Windows Phone

I’m trying to build a project for Windows Phone using Json.net. This is what I got.

I have downloaded the latest source of Json.net from here,
Releases · JamesNK/Newtonsoft.Json · GitHub,
opened the solution with VS2013, added UnityEngine.dll to the references and built the project targeting .net2.0. The app runs fine in the editor. And according to this page, Introduction, Json.net supports WP8.

Any advice is well appreciated. Thanks in advance.

Build project for WP8 specifically, this will give you compilations errors for all unsupported APIs.

1 Like

The other thing you can do is to put your .NET 2.0 / 3.5 version in an /Editor special folder and download the official release and put it in a folder for WP8. I think that may work, though I’m not positive. What you’ll run into is that there are two compilation passes that happen here. The first one is in the editor itself so you have to have a version of JSON .NET that works in the editor and the second pass is the Windows build (Universal, Store, Phone 8.1 etc) so you’ll have to have the Windows specific version for that. I tackled this in my port by using compiler directives to make sure only the relevant portions build in the right scenario.