Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Joseph 59 posts 140 karma points
    Oct 16, 2014 @ 05:55
    Joseph
    0

    Is the latest version of Json.NET compatible with Umbraco 6.1.6?

    Hello

    We have a whole bunch of sites that have been running Umbraco 6.1.6 - most of us are running Visual Studio 2012 - and everything has been working fine as far as we can tell. Something happened overnight however (not exactly sure what at this point - at this point best guess is a 'routine' Windows update that ran last night) which caused the exception

    Method not found: 'Void Newtonsoft.Json.Serialization.DefaultContractResolver.set_IgnoreSerializableAttribute(Boolean)'. 
    

    when running the project locally with Visual Studio. A quick Google suggested that some people had rectified the issue by updating Json.NET (for instance here) - and indeed we found that when Json.NET is updated to the latest version (from 4.5 to 6.0) via Nuget, everything appears to work fine.

    I'm wary however of any possible issues that there might be with this version of Umbraco and the Json.NET v6. I notice for instance that Sebastiaan has commented here that the upgrade is not backwards compatible because of a breaking change in Json.NET. I was wondering if someone from the Umbraco Core team comment on what these changes in Json.NET affect in Umbraco? It's not going to be possible for us to upgrade all our customers to 7 at this point - at the same time, it's impossible for us to work on these sites without upgrading Json.NET.

    I would appreciate any guidance here - whether it is to confirm that it's safe for us to upgrade our 6.1.6 projects to the latest version of Json.NET; alternatively if anyone has any further workarounds that Newtonsoft YSOD when working locally.

    Thanks!

  • Sebastiaan Janssen 5017 posts 15332 karma points MVP admin hq
    Oct 16, 2014 @ 07:47
    Sebastiaan Janssen
    0

    I'm currently suspecting Windows Update (updated this Tuesday) from breaking some things for some people (althoug I could not reproduce these problems).

    Try a rebuild of your project to see if that helps. If not then it should be fine to upgrade, the breaking change is in the JsonSchema type which you're very unlikely to be using directly.

    As always, make backups etc.

  • Joseph 59 posts 140 karma points
    Oct 16, 2014 @ 22:31
    Joseph
    0

    Thanks! I'll let you know if we run into any issues with the upgrade.

  • Andrew Tregonning 19 posts 41 karma points
    Oct 20, 2014 @ 23:35
    Andrew Tregonning
    0

    Hi Joseph

    I've experienced exactly the same issue with a couple of my 6.1.6 sites. Did the upgrade of Json.NET to version 6 work okay for you?

    Thanks,
    Andrew

  • Joseph 59 posts 140 karma points
    Oct 21, 2014 @ 00:45
    Joseph
    0

    Hi Andrew

    We've not had to roll anything out to production at this point so I can't say for sure if this 'fix' has problems where it matters the most. No one on the team has experienced any issues locally after upgrading Json.NET at this point however.

  • Andrew Tregonning 19 posts 41 karma points
    Oct 21, 2014 @ 22:01
    Andrew Tregonning
    2

    Thanks Joseph

    For anyone else that sees this, I upgraded the Newtonsoft.Json nuget pacakge from 4.5.1 to 4.5.11 (which is the version used by Umbraco 6.2.4). That solved my immediate problem on the production server. A few oddities in dev, but that's an issue for another day.

    Cheers!

Please Sign in or register to post replies

Write your reply to:

Draft