I have a sample site installed that is currently using version 7.5.394.2 of the episerver.dll. The site has Newtonsoft.Json 6.0.1 installed and the nuget package for episerver.core 7.6.3 states that it wants Newtonsoft.Json < 6.0.
Is there any breaking changes in the Newtonsoft.Json 6.0.1 package that makes it impossible to use with episerver 7,6,3?
With few hacks you are able to use >6.0 Json.Net in 7.6.3 installation. I'm not aware of huge breaking changes above 6.0 in library (some obsoletes have been removed).
All >= 7.5 versions of Framework are targeting Json.Net between 5.0 and 6.0. I suppose that this is done because of "securing" package compatibility - code has been tested with those libraries and upgrade is clearly marked as - "on your own risk".
Valdis, how did you get this to work, what hacks did you do?
Hack is pretty easy (but not forward compatible - as you would need to do the same stuff once again after upgrade of EPiServer.Framework package).
Open packages/EPiServer.Framework.7.5.1003.0/EPiServer.Framework.7.5.1003.0.nupkg with NuGet Package Explorer. Edit meta-data to remove upper version constraint for Json dependency:
<dependency id="Newtonsoft.Json" version="5.0.8" />
After .nupkg file save, do the same for .nuspec file in the same dir.
Then upgrade Json to newer version (at the moment fo writing - 6.0.3).
Verify correct assembly bindings (web.config):
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-22.214.171.124" newVersion="126.96.36.199" />
Thanks Valdis.I ended up downgrading newtonsoft.json since it was only webgrease that used it and it did not need 6.0I would be nice if EPiServer could upgrade to 6
Just to bump to topic, could the EPiServer packages at least be changed to allow higher versions of Json.NET so in stead of using (5,6] use (5,7] in the nuspec to allow version 5 and 6 excluding version 7 for now.this would fix a bunch of issues with installing other packages that are 6 or later compatible.
I second that ^
Valdis:Do I open the package from EPiServer Nuget Source or locally? How do I update EPiServer Framwork (to current 7.13.3) after saving the .nuget file? I cannot find a .nuspec file in the folder
Thanks in advance.
I used Nuget Package Explorer https://npe.codeplex.com/ to update the zip. we have a local nuget feed where the packages are moved.But you could also setup a local folder as a feed or have the package in source control.
I followed the instructions in thread http://world.episerver.com/Forum/Developer-forum/-EPiServer-75-CMS/Thread-Container/2014/8/Nuget-updates-and-other-package-dependencies/ and got it to work.
NPE is the tool. I do not use NuGet restore so I just modify my local copy of package files in packages/ folder.
EPiServer has done a regression test of newtonsoft.Json 6. Though most of the products and add-ons seem to work fine, there are two issues found that needs to be resolved before we can update our dependencies. For you that want to upgrade anyway I can mention that the affected areas are:
Thanks Linus good to know!