[CLOSED] Can Ext.NET 1.x support newer Json.NET?

  1. #1

    [CLOSED] Can Ext.NET 1.x support newer Json.NET?

    Hi,

    Is it possible for Ext.NET 1.x to support a more up to date version of Json.NET?

    The reason I ask is we would like to introduce Web API into our current project. When you do that, Visual Studio automatically brings in various dependencies including Json.NET. This ends up overriding the reference to the version that is used by Ext.NET 1.x, but when you compile you get an error similar to this:

    Error 2 Assembly '<Your Project>' uses 'Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' which has a higher version than referenced assembly 'Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' d:\Projects\Sonetto\bin\Sonetto.dll Sonetto.Test

    Ext.NET 1.x references Json.NET 4.5.

    I have no idea if it is a major effort to support Json.NET 6???

    Thanks!
    Last edited by Daniil; Nov 25, 2014 at 5:09 PM. Reason: [CLOSED]
  2. #2
    Sorry. Ignore. It seems to work.

    I removed the reference to the original Json.NET manually from the project and then added the Web API controller, which brought in the later Json.NET and it seems to compile and run...
  3. #3
    Just a quick update (and reminder for myself!)

    While removing the Json.NET version that came with Ext.NET 1 worked, unit test projects I had failed (we had some code loading assemblies for a given domain which failed to find the version of Json.NET that Ext.NET was expecting).

    Turned out in the unit test project, we just needed the same assembly redirect that was added (by VS or NuGet I think) to the main projects:

        <runtime>
            <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
                <dependentAssembly>
                    <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
                    <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
                </dependentAssembly>
            </assemblyBinding>
        </runtime>
    That works for us (our over-sized solution with thousands of unit tests etc all continue to work. I don't know if that is officially supported for Ext.NET 1, but while I use a fair few features of Ext.NET I am sure there is a LOT I do not use :))
  4. #4
    Anup, thank you for the question and sharing all the additional information.

    We are glad that you were able to sort it out.

    As for upgrading Json.NET in v1, we are probably not going to do that. It doesn't worth enough comparing a chance to introduce some breaking change or bug and efforts that would be required to test out everything.

    If you have any other thoughts or information that might change our mind, please feel free to share.
  5. #5
    Hi,

    Sorry for the delayed reply (been away!).

    What you say is fair enough. For our usages so far it seems to be working, but of course I am not using every single bit, so your caution makes sense.

    Thanks!
    Anup

Similar Threads

  1. [CLOSED] Using JSON.Serialize() and JSON.Deserialize()
    By vadym.f in forum 1.x Legacy Premium Help
    Replies: 7
    Last Post: Apr 30, 2013, 2:37 PM
  2. Replies: 7
    Last Post: Dec 13, 2012, 11:55 AM
  3. [2.0 rc2] Support ASP.MVC and IE6~IE8?
    By Gary in forum 2.x Help
    Replies: 4
    Last Post: Jul 13, 2012, 8:50 AM
  4. [CLOSED] Does windows autoload parameters support JSON
    By leon_tang in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Feb 29, 2012, 1:34 PM

Posting Permissions