Could not load file or assembly 'Newtonsoft.Json, Version=4.5.0.0, Culture=neutral,...












209















I am getting the Error




System.IO.FileLoadException : Could not load file or assembly
'Newtonsoft.Json, Version=4.5.0.0, Culture=neutral,
PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The
located assembly's manifest definition does not match the assembly
reference. (Exception from HRESULT: 0x80131040)




for my CI build



Solution which I tried



<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>


It also did not work










share|improve this question

























  • The error means .NET couldn't find the Json.NET library. Do you have it installed?

    – TypeIA
    Mar 19 '14 at 13:24








  • 16





    Exact same problenm - driving me nuts. Let me know if you find a solution

    – Dean Chalk
    Apr 1 '14 at 18:11











  • Actually, for me adding what you tried solved the problem.

    – h.alex
    Apr 1 '15 at 20:55











  • Use the consolidate option in NuGet package manager to ensure versions don't drift apart.

    – niico
    Apr 12 '17 at 9:08











  • This is the only thing that worked for me: github.com/Redth/PushSharp/issues/361#issuecomment-181387928

    – RichC
    Dec 7 '18 at 19:00
















209















I am getting the Error




System.IO.FileLoadException : Could not load file or assembly
'Newtonsoft.Json, Version=4.5.0.0, Culture=neutral,
PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The
located assembly's manifest definition does not match the assembly
reference. (Exception from HRESULT: 0x80131040)




for my CI build



Solution which I tried



<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>


It also did not work










share|improve this question

























  • The error means .NET couldn't find the Json.NET library. Do you have it installed?

    – TypeIA
    Mar 19 '14 at 13:24








  • 16





    Exact same problenm - driving me nuts. Let me know if you find a solution

    – Dean Chalk
    Apr 1 '14 at 18:11











  • Actually, for me adding what you tried solved the problem.

    – h.alex
    Apr 1 '15 at 20:55











  • Use the consolidate option in NuGet package manager to ensure versions don't drift apart.

    – niico
    Apr 12 '17 at 9:08











  • This is the only thing that worked for me: github.com/Redth/PushSharp/issues/361#issuecomment-181387928

    – RichC
    Dec 7 '18 at 19:00














209












209








209


35






I am getting the Error




System.IO.FileLoadException : Could not load file or assembly
'Newtonsoft.Json, Version=4.5.0.0, Culture=neutral,
PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The
located assembly's manifest definition does not match the assembly
reference. (Exception from HRESULT: 0x80131040)




for my CI build



Solution which I tried



<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>


It also did not work










share|improve this question
















I am getting the Error




System.IO.FileLoadException : Could not load file or assembly
'Newtonsoft.Json, Version=4.5.0.0, Culture=neutral,
PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The
located assembly's manifest definition does not match the assembly
reference. (Exception from HRESULT: 0x80131040)




for my CI build



Solution which I tried



<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>


It also did not work







asp.net json.net






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jul 2 '14 at 13:25









Owen Blacker

3,14212866




3,14212866










asked Mar 19 '14 at 13:20









user3437755user3437755

1,046273




1,046273













  • The error means .NET couldn't find the Json.NET library. Do you have it installed?

    – TypeIA
    Mar 19 '14 at 13:24








  • 16





    Exact same problenm - driving me nuts. Let me know if you find a solution

    – Dean Chalk
    Apr 1 '14 at 18:11











  • Actually, for me adding what you tried solved the problem.

    – h.alex
    Apr 1 '15 at 20:55











  • Use the consolidate option in NuGet package manager to ensure versions don't drift apart.

    – niico
    Apr 12 '17 at 9:08











  • This is the only thing that worked for me: github.com/Redth/PushSharp/issues/361#issuecomment-181387928

    – RichC
    Dec 7 '18 at 19:00



















  • The error means .NET couldn't find the Json.NET library. Do you have it installed?

    – TypeIA
    Mar 19 '14 at 13:24








  • 16





    Exact same problenm - driving me nuts. Let me know if you find a solution

    – Dean Chalk
    Apr 1 '14 at 18:11











  • Actually, for me adding what you tried solved the problem.

    – h.alex
    Apr 1 '15 at 20:55











  • Use the consolidate option in NuGet package manager to ensure versions don't drift apart.

    – niico
    Apr 12 '17 at 9:08











  • This is the only thing that worked for me: github.com/Redth/PushSharp/issues/361#issuecomment-181387928

    – RichC
    Dec 7 '18 at 19:00

















The error means .NET couldn't find the Json.NET library. Do you have it installed?

– TypeIA
Mar 19 '14 at 13:24







The error means .NET couldn't find the Json.NET library. Do you have it installed?

– TypeIA
Mar 19 '14 at 13:24






16




16





Exact same problenm - driving me nuts. Let me know if you find a solution

– Dean Chalk
Apr 1 '14 at 18:11





Exact same problenm - driving me nuts. Let me know if you find a solution

– Dean Chalk
Apr 1 '14 at 18:11













Actually, for me adding what you tried solved the problem.

– h.alex
Apr 1 '15 at 20:55





Actually, for me adding what you tried solved the problem.

– h.alex
Apr 1 '15 at 20:55













Use the consolidate option in NuGet package manager to ensure versions don't drift apart.

– niico
Apr 12 '17 at 9:08





Use the consolidate option in NuGet package manager to ensure versions don't drift apart.

– niico
Apr 12 '17 at 9:08













This is the only thing that worked for me: github.com/Redth/PushSharp/issues/361#issuecomment-181387928

– RichC
Dec 7 '18 at 19:00





This is the only thing that worked for me: github.com/Redth/PushSharp/issues/361#issuecomment-181387928

– RichC
Dec 7 '18 at 19:00












40 Answers
40






active

oldest

votes













1 2
next












218














In package manager console execute: Update-Package –reinstall Newtonsoft.Json.



UPDATE



I originally posted this as a comment but as @OwenBlacker suggested I'll just put it here:



If you still get an error after doing this, then what worked for me eventually is that I deleted Json.Net's <dependentAssembly> section from my .config file. Reinstall brings it back if it's not there and apparently you need to delete it. Until there will be a normal solution in the package itself, I'm afraid this manual step is a must.



Note: Please read the comments below before doing this.



As per René's comment below BE AWARE that the command posted in the answer will reinstall the package in every project in your solution. So if you use the Newtonsoft.Json package in several projects and maybe use different versions, just executing the above command might have unwanted consequences.






share|improve this answer





















  • 7





    For the sake of everyone reading this: I've done that and still got the error. Then I solved it somehow: Amazingly, I had to delete Json.Net's <dependentAssembly> section from my .config file. Reinstall brings it back if it's not there and apparently you need to delete it. Until there will be a normal solution in the package itself, I'm afraid this manual step is a must.

    – Ofer Zelig
    Jun 27 '14 at 0:36











  • @OferZelig You should post that as a separate answer, so it can get the upvotes (and, more importantly, increased attention). Not least because it worked for me too :)

    – Owen Blacker
    Jul 3 '14 at 0:04













  • @OwenBlacker thanks. But because there are lots of answers already, mine will get lost. And this answer is quite good, it's just that if it doesn't work then my comment "completes" it. You know what? I guess I'll just edit the original answer. More important than gaining own rep.

    – Ofer Zelig
    Jul 4 '14 at 0:04






  • 39





    BE AWARE that the command posted in the answer will reinstall the package in every project in your solution. So if you use the Newtonsoft.Json package in several projects and maybe use different versions, just executing the above command might have unwanted consequences.

    – René
    Jul 10 '14 at 11:09













  • Solved! For me, I had v6 installed in one project, reinstalling from package manager brought it up to v7.

    – alias65536
    Jul 20 '15 at 19:13



















114














To everyone having problems with Newtonsoft.Json v4.5 version try using this in web.config or app.config:



<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>


IMPORTANT: Check that the configuration tag of your config file has no namespace attribute (as suggested in https://stackoverflow.com/a/12011221/150370). Otherwise, assemblyBinding tags will be ignored.






share|improve this answer





















  • 3





    for me, deleting the content of the bin folder manually after cleaning (which does not empty it) did the trick after I applied this answer.

    – Mikaël Mayer
    Oct 2 '14 at 8:27











  • Thanks a ton for this! :)

    – Kamron K.
    Jan 8 '15 at 5:53











  • Tried this didn't work for me :(

    – PUG
    Apr 1 '15 at 17:55











  • This did the trick for me!

    – Steven Ryssaert
    Jun 3 '15 at 0:10






  • 1





    That note on the namespace...I could hug you. I burned hours on this not knowing the binding redirects were being ignored because of that.

    – Brian
    Nov 10 '16 at 14:55



















37














The key point is referencing right version in your config file.



Steps;



1- look at what is the version of your Newtonsoft.Json.dll in the project reference property what ever the version in your package folder (For example mine is 7.0.1 and the reference Version is 7.0.0.0)



2- look at what the project expect from you in the exception (mine is 6.0.0.0)



3- Add dependent assembly to your config file as it should be..



  <dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30AD4FE6B2A6AEED" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="7.0.0.0"/>
</dependentAssembly>





share|improve this answer


























  • Sorry can give only one vote your point (For example mine is 7.0.1 and the referance Version is 7.0.0.0) made a huge difference. I would have given more.....Thanks :)

    – Zaker
    Dec 8 '15 at 7:43











  • This worked for me. I updated the version to 7, but it was really running version 8 so I just changed the newVersion to 8.0, thanks!

    – Keith
    Mar 9 '16 at 13:12











  • Even though installing 8.0.3 (like it says in nuget package manager), the .dll under references is still 8.0.0. So I changed to 8.0.0.0 in my web.config. Wierd how this worked yesterday when I published everything and this morning it does not work anymore.

    – CularBytes
    Apr 25 '16 at 7:39



















24














I had no luck with any of the solutions presented here (uninstalling, reinstalling, deleting references, creating bindingRedirects etc.) I had to go back to an old version of Newtonsoft. Version 5.0.6 had been working before, so I tried that one. I had to enter these two commands in the Package Console:



uninstall-package newtonsoft.json -force



install-package newtonsoft.json -version "5.0.6"



The -force option in the first command is required to force the uninstall. Dependencies with other assemblies prevent the uninstall without it.






share|improve this answer


























  • This solution worked, Thanks

    – PUG
    Apr 1 '15 at 20:08











  • Worked like a charm. Had the error in my MVC 4 project. Almost switched to the native serializer.

    – Kees C. Bakker
    May 31 '15 at 19:41













  • Thank you so much!!

    – Ashish
    Jul 24 '15 at 4:52











  • thanks, I just needed to change -version "5.0.6" to -pre: install-package newtonsoft.json -pre

    – thiago.adriano26
    Oct 24 '15 at 12:21





















21














I fixed the problem adding this binding redirect to my .config file:



<runtime>
. . .
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed"
culture="neutral" />
<bindingRedirect oldVersion="4.5.0.0" newVersion="6.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>


The error message complains about not finding version 4.5.0.0, the current version of Newtonsoft.Json is 6.0.0.0 so the redirect should go from 4.5 to 6.0, not viceversa






share|improve this answer
























  • Yes this solved my problem. So strange the amount of issues JSON.NET causes.. but once it goes its a dream machine. Thanks +1

    – ppumkin
    Jul 21 '16 at 20:27











  • Your code snippet made me realize was missing 'assemblyBinding' element. Thanks

    – Riga
    Feb 22 '17 at 6:32



















19














I think you are pointing to the wrong target, change it to 4.5 instead of 6.0



<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed"
culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="4.5.0.0" />
</dependentAssembly>


This should work.






share|improve this answer





















  • 1





    Umbraco 7 required 4.5.0.0, so this helped get it up and running

    – MagicalArmchair
    Jan 13 '15 at 16:53



















18














I've spend couple of days trying to resolve this frustrating issue. I've tried pretty much everything that can be found on the web. Finally I found that this error could be caused (like in my case) by the different target .Net project versions (4.5 and 4.5.1) in one solution. The steps bellow fixed it for me:




  1. Double check the .Net version of every project that's in your solution. Just right click on project and go to Properties.


enter image description here




  1. If possible set the same .Net version for all projects. If not at least try to change the Startup project one (for me this was the one causing the issues).



  2. Remove all Newtonsoft.Json packs from the solution.



    uninstall-package newtonsoft.json -force




  3. Update all Newtonsoft.Json versions in all packages.config files, like so



    <package id="Newtonsoft.Json" version="7.0.1" targetFramework="net451" />




  4. Reinstall Newtonsoft.Json from "Package Manager Console" with:



    install-package newtonsoft.json



  5. Rebuild the solution



(Optional) 7. If you changed the Startup project, return it again






share|improve this answer

































    11














    uninstall-package newtonsoft.json -force
    install-package newtonsoft.json


    Did the trick for me :)






    share|improve this answer





















    • 1





      this did the trick for me too. it automatically updated the webconfig file to the correct version.

      – Shaakir
      Jul 19 '16 at 9:48











    • Me too, this really helped.

      – MikeMalter
      Oct 17 '17 at 23:04



















    9














    Remove the Newtonsoft.Json assembly from the project reference and add it again. You probably deleted or replaced the dll by accident.






    share|improve this answer
























    • Thanks..tried that still getting same issue

      – user3437755
      Mar 20 '14 at 10:27











    • This approached works against a Xamarin Forms iOS project where I dropped the NuGet package and re-added it. Thanks.

      – The Senator
      Nov 30 '16 at 12:17



















    9














    I was writing a WebApi REST service client, so for me this error was caused by adding References to the System.Net.Http and System.Net.Http.Formatting assemblies manually via Add Reference, when I should have added the Microsoft.AspNet.WebApi.Client package via NuGet.
    See also this answer to another question.






    share|improve this answer

































      9














      if you using multiple project in same solution
      and library of the one other
      check is all projects has same version of Newtonsoft.Json






      share|improve this answer



















      • 1





        You nailed it, thank you very much

        – Roger Barretto
        Nov 7 '16 at 21:27











      • This was my issue. Very frustrating going through all the responses above and getting no results. Finally figured it out when I bothered to check the version of the .dll in my Build folder.

        – user2836056
        Mar 22 '18 at 17:24



















      7














      You have 2 different versions of JSON.NET library in your solution. To solve this you should upgrade them to latest version. Follow these steps:



      1-Open solution explorer
      2-Right Click on solution name
      3-Select Manage Nuget Packages for Solution
      4-Select Updates from menu
      5-Update JSON.NET package



      This will resolve your issue.



      link:
      Could not load file or assembly 'Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies






      share|improve this answer
























      • The easiest and safest way to fix this problem. Thanks @mohammad

        – deanwilliammills
        Jun 26 '18 at 13:32



















      6














      Normally adding the binding redirect should solve this problem, but it was not working for me. After a few hours of banging my head against the wall, I realized that there was an xmlns attribute causing problems in my web.config. After removing the xmlns attribute from the configuration node in Web.config, the binding redirects worked as expected.



      http://www.davepaquette.com/archive/2014/10/02/could-not-load-file-or-assembly-newtonsoft-json-version4-5-0-0.aspx






      share|improve this answer































        5














        Deploy the correct version to the CI machine



        This is telling you that the assembly loader found a different version of the Newtonsoft.Json assembly, that does not match the reference you created in your project. To load the assembly correctly, you must either deploy the assembly side by side with your compiled code, or install the correct version of the assembly in the destination machine (i.e. in the GAC).



        Alternative: make sure the configuration is in the correct file



        If you want to keep the current solution, and load an assembly with a different version, make sure that the configuration you posted is in the correct .config file. Remember that there is no xpto.dll.config, a DLL loaded by an application always uses the config file of the running application.






        share|improve this answer

































          5














          <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="7.0.0.0"/>
          </dependentAssembly>
          </assemblyBinding>




          Works for me.... just put the version you are using in newVersion i.e(newVersion="7.0.0.0")






          share|improve this answer


























          • Had this problem some times ago and this fixed in one hit. Thank you very much.

            – GutierrezDev
            Sep 14 '16 at 18:40



















          5














          Close solution.



          Open packages.config and *.csproj with text editor and delete any line have Newtonsoft.Json



          Ex:
          <Reference Include="Newtonsoft.Json,Version=9.0.0.0,Culture=neutral,PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
          <HintPath>..packagesNewtonsoft.Json.9.0.1libnet40Newtonsoft.Json.dll</HintPath>
          <Private>True</Private>
          </Reference>



          Or
          <package id="Newtonsoft.Json" version="9.0.1" targetFramework="net40" />



          Open solution again and re-install Newtonsoft.Json by Install-Package Newtonsoft.Json



          It work for me.






          share|improve this answer


























          • it works sometime but in the upcoming builds this problem came again n again

            – Heemanshu Bhalla
            Aug 12 '16 at 6:47











          • No problem if don't update it haha. Create trash project and install Newtonsoft.Json.dll, copy it (file dll) and add to your project reference.

            – Trương Quốc Khánh
            Sep 24 '16 at 6:51





















          4














          We had the exact same issue that you mentioned. We're using nunit to run tests through CI, and we have nunit running a file called tests.nunit, which describe a list of test dll fixtures to run.



          Each test fixture had their own config file, but when run through the "tests.nunit" file the binding redirects seem to be ignored. The solution was to add the binding redirects to a new config file, "tests.config" that was beside the "tests.nunit" file.






          share|improve this answer
























          • can you elaborate?

            – KirstieBallance
            Mar 8 at 21:44



















          4














          You should update the web.config file in the server.
          When nuget install NewtonSoft update this file including this code



          <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>







          share|improve this answer


























          • In my case that was exactly my solution, put into app.config. "Assembly versions can be redirected in application, publisher policy, or machine configuration files."

            – datps
            Aug 2 '16 at 6:01



















          3














          I have got the same type of problem. And I also solved it just doing the following:
          Go to TOOLS > NuGet Package Manager and Select Package Manager Console. Finally, execute the following two commands :)




          1. uninstall-package newtonsoft.json -force

          2. install-package newtonsoft.json






          share|improve this answer































            3














            In my case, the main project was still referencing an old version of Newtonsoft.Json which didn't exists in the project any more (shown by a yellow exclamation mark). Removing the reference solved the problem, no bindingRedirect was necessary.






            share|improve this answer































              3














              I had the exact same problem with version 7.0.0.0, and the lib causing my problem was Microsoft.Rest.ClientRuntime which somehow was referring to the wrong version (6.0.0.0) of Newtonsoft.json, despite the right dependency management in nugget (the right version of newtonsoft.json (7.0.0.0) was installed).



              I solved this by applying the redirection above from 6.0.0.0 to 7.0.0.0 (from Kadir Can) in the config file:



              <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="7.0.0.0" />


              ----> After a few days without changing anything it came up again with the same error. I installed version 6.0.0.0 n updated it to 7.0.0.0 it works fine now.






              share|improve this answer


























              • Worked for me. Installed version Newtonsoft Json 7.0.1 (beta), but the config generated was pointing to 6.0.0.0 which was not correct. Thanks!

                – Dhanuka777
                Nov 5 '15 at 2:36



















              3














              Just check the version of Newtonsoft.Json Newtonsoft properties



              Then you need to add that version in your web config (in my case 8.0.0.0)
              Web config






              share|improve this answer































                2














                In my case, after downloading the assembly and adding the reference to the project, I solved this by 'unblocking' the DLL before adding the reference to the project.



                Using Windows explorer, browse to the DLL location, right-click on the DLL and then select 'properties'. You'll find an 'unblock' button on one of the tabs and then you can add the reference and the assembly will load correctly.






                share|improve this answer































                  2














                  I made the mistake of adding a NewtonSoft .dll file for .Net 4.5.



                  My main project was 4.5, but when I added an extra project to my solution, it strangely added it as a .Net 2.0 project... and when I attempted to use NewtonSoft's 4.5 dll with this, I got this "Newtonsoft.Json couldn't be found" error.



                  The solution (of course) was to change this new project from .Net 2.0 to 4.5.






                  share|improve this answer































                    2














                    Nothing from above helped me, but what actually fixed it is the following:





                    1. Remove all dependency bindings in app.config (from all app.config files in the solution)

                    2. Execute the following command from "Package Manager Console"


                    Get-Project -All | Add-BindingRedirect




                    1. Rebuild


                    Reference:
                    http://blog.myget.org/post/2014/11/27/Could-not-load-file-or-assembly-NuGet-Assembly-Redirects.aspx






                    share|improve this answer

































                      2














                      Right click your project select manage Nuget packages, type newtonsoft in the search box and install the latest version. Then Run your App






                      share|improve this answer































                        2














                        I was facing the same error and struggled with it for hours. I had a web API project which is using Newtonsoft.json and another UnitTest project for the web API project. The unit test project also needed the Newtonsoft.json reference. But on adding the link I was getting the above exception.



                        I finally resolved it by adding the below code snippet in the app.config of the unit test project:



                        <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>





                        share|improve this answer


























                        • <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>

                          – mukulsharma1146
                          May 18 '15 at 13:06











                        • I was having this same problem when I upgraded Nestwonsoft.Json while still using and old version of WebAPI, and this solved it. Thanks!

                          – Gavin.Paolucci.Kleinow
                          Jun 17 '15 at 14:50



















                        2














                        Another insidious problem is that it appears that binding redirects can just silently fail if the element has an incorrect configuration on any other dependentAssembly elements.



                        Ensure that you only have one element under each element.



                        In some instances, VS generates this:



                          <dependentAssembly>
                        <assemblyIdentity ...
                        <assemblyIdentity ...
                        </dependentAssembly>


                        Instead of



                          <dependentAssembly>
                        <assemblyIdentity ...
                        </dependentAssembly>
                        <dependentAssembly>
                        <assemblyIdentity ...
                        </dependentAssembly>


                        Took me a long time to realise this was the problem!






                        share|improve this answer































                          2














                          Below section add in to your web.config



                          <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>





                          share|improve this answer































                            2














                            If error disappears locally and still appears on server, the solution that works with me is to delete bin folder and packages.config and web.config and reupload these files






                            share|improve this answer



























                              1 2
                              next


                              protected by Pankaj Parkar Nov 21 '16 at 20:46



                              Thank you for your interest in this question.
                              Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).



                              Would you like to answer one of these unanswered questions instead?














                              40 Answers
                              40






                              active

                              oldest

                              votes








                              40 Answers
                              40






                              active

                              oldest

                              votes









                              active

                              oldest

                              votes






                              active

                              oldest

                              votes








                              1 2
                              next










                              218














                              In package manager console execute: Update-Package –reinstall Newtonsoft.Json.



                              UPDATE



                              I originally posted this as a comment but as @OwenBlacker suggested I'll just put it here:



                              If you still get an error after doing this, then what worked for me eventually is that I deleted Json.Net's <dependentAssembly> section from my .config file. Reinstall brings it back if it's not there and apparently you need to delete it. Until there will be a normal solution in the package itself, I'm afraid this manual step is a must.



                              Note: Please read the comments below before doing this.



                              As per René's comment below BE AWARE that the command posted in the answer will reinstall the package in every project in your solution. So if you use the Newtonsoft.Json package in several projects and maybe use different versions, just executing the above command might have unwanted consequences.






                              share|improve this answer





















                              • 7





                                For the sake of everyone reading this: I've done that and still got the error. Then I solved it somehow: Amazingly, I had to delete Json.Net's <dependentAssembly> section from my .config file. Reinstall brings it back if it's not there and apparently you need to delete it. Until there will be a normal solution in the package itself, I'm afraid this manual step is a must.

                                – Ofer Zelig
                                Jun 27 '14 at 0:36











                              • @OferZelig You should post that as a separate answer, so it can get the upvotes (and, more importantly, increased attention). Not least because it worked for me too :)

                                – Owen Blacker
                                Jul 3 '14 at 0:04













                              • @OwenBlacker thanks. But because there are lots of answers already, mine will get lost. And this answer is quite good, it's just that if it doesn't work then my comment "completes" it. You know what? I guess I'll just edit the original answer. More important than gaining own rep.

                                – Ofer Zelig
                                Jul 4 '14 at 0:04






                              • 39





                                BE AWARE that the command posted in the answer will reinstall the package in every project in your solution. So if you use the Newtonsoft.Json package in several projects and maybe use different versions, just executing the above command might have unwanted consequences.

                                – René
                                Jul 10 '14 at 11:09













                              • Solved! For me, I had v6 installed in one project, reinstalling from package manager brought it up to v7.

                                – alias65536
                                Jul 20 '15 at 19:13
















                              218














                              In package manager console execute: Update-Package –reinstall Newtonsoft.Json.



                              UPDATE



                              I originally posted this as a comment but as @OwenBlacker suggested I'll just put it here:



                              If you still get an error after doing this, then what worked for me eventually is that I deleted Json.Net's <dependentAssembly> section from my .config file. Reinstall brings it back if it's not there and apparently you need to delete it. Until there will be a normal solution in the package itself, I'm afraid this manual step is a must.



                              Note: Please read the comments below before doing this.



                              As per René's comment below BE AWARE that the command posted in the answer will reinstall the package in every project in your solution. So if you use the Newtonsoft.Json package in several projects and maybe use different versions, just executing the above command might have unwanted consequences.






                              share|improve this answer





















                              • 7





                                For the sake of everyone reading this: I've done that and still got the error. Then I solved it somehow: Amazingly, I had to delete Json.Net's <dependentAssembly> section from my .config file. Reinstall brings it back if it's not there and apparently you need to delete it. Until there will be a normal solution in the package itself, I'm afraid this manual step is a must.

                                – Ofer Zelig
                                Jun 27 '14 at 0:36











                              • @OferZelig You should post that as a separate answer, so it can get the upvotes (and, more importantly, increased attention). Not least because it worked for me too :)

                                – Owen Blacker
                                Jul 3 '14 at 0:04













                              • @OwenBlacker thanks. But because there are lots of answers already, mine will get lost. And this answer is quite good, it's just that if it doesn't work then my comment "completes" it. You know what? I guess I'll just edit the original answer. More important than gaining own rep.

                                – Ofer Zelig
                                Jul 4 '14 at 0:04






                              • 39





                                BE AWARE that the command posted in the answer will reinstall the package in every project in your solution. So if you use the Newtonsoft.Json package in several projects and maybe use different versions, just executing the above command might have unwanted consequences.

                                – René
                                Jul 10 '14 at 11:09













                              • Solved! For me, I had v6 installed in one project, reinstalling from package manager brought it up to v7.

                                – alias65536
                                Jul 20 '15 at 19:13














                              218












                              218








                              218







                              In package manager console execute: Update-Package –reinstall Newtonsoft.Json.



                              UPDATE



                              I originally posted this as a comment but as @OwenBlacker suggested I'll just put it here:



                              If you still get an error after doing this, then what worked for me eventually is that I deleted Json.Net's <dependentAssembly> section from my .config file. Reinstall brings it back if it's not there and apparently you need to delete it. Until there will be a normal solution in the package itself, I'm afraid this manual step is a must.



                              Note: Please read the comments below before doing this.



                              As per René's comment below BE AWARE that the command posted in the answer will reinstall the package in every project in your solution. So if you use the Newtonsoft.Json package in several projects and maybe use different versions, just executing the above command might have unwanted consequences.






                              share|improve this answer















                              In package manager console execute: Update-Package –reinstall Newtonsoft.Json.



                              UPDATE



                              I originally posted this as a comment but as @OwenBlacker suggested I'll just put it here:



                              If you still get an error after doing this, then what worked for me eventually is that I deleted Json.Net's <dependentAssembly> section from my .config file. Reinstall brings it back if it's not there and apparently you need to delete it. Until there will be a normal solution in the package itself, I'm afraid this manual step is a must.



                              Note: Please read the comments below before doing this.



                              As per René's comment below BE AWARE that the command posted in the answer will reinstall the package in every project in your solution. So if you use the Newtonsoft.Json package in several projects and maybe use different versions, just executing the above command might have unwanted consequences.







                              share|improve this answer














                              share|improve this answer



                              share|improve this answer








                              edited May 19 '16 at 12:31









                              s_a

                              9314




                              9314










                              answered Apr 30 '14 at 7:00









                              bobah75bobah75

                              2,6561920




                              2,6561920








                              • 7





                                For the sake of everyone reading this: I've done that and still got the error. Then I solved it somehow: Amazingly, I had to delete Json.Net's <dependentAssembly> section from my .config file. Reinstall brings it back if it's not there and apparently you need to delete it. Until there will be a normal solution in the package itself, I'm afraid this manual step is a must.

                                – Ofer Zelig
                                Jun 27 '14 at 0:36











                              • @OferZelig You should post that as a separate answer, so it can get the upvotes (and, more importantly, increased attention). Not least because it worked for me too :)

                                – Owen Blacker
                                Jul 3 '14 at 0:04













                              • @OwenBlacker thanks. But because there are lots of answers already, mine will get lost. And this answer is quite good, it's just that if it doesn't work then my comment "completes" it. You know what? I guess I'll just edit the original answer. More important than gaining own rep.

                                – Ofer Zelig
                                Jul 4 '14 at 0:04






                              • 39





                                BE AWARE that the command posted in the answer will reinstall the package in every project in your solution. So if you use the Newtonsoft.Json package in several projects and maybe use different versions, just executing the above command might have unwanted consequences.

                                – René
                                Jul 10 '14 at 11:09













                              • Solved! For me, I had v6 installed in one project, reinstalling from package manager brought it up to v7.

                                – alias65536
                                Jul 20 '15 at 19:13














                              • 7





                                For the sake of everyone reading this: I've done that and still got the error. Then I solved it somehow: Amazingly, I had to delete Json.Net's <dependentAssembly> section from my .config file. Reinstall brings it back if it's not there and apparently you need to delete it. Until there will be a normal solution in the package itself, I'm afraid this manual step is a must.

                                – Ofer Zelig
                                Jun 27 '14 at 0:36











                              • @OferZelig You should post that as a separate answer, so it can get the upvotes (and, more importantly, increased attention). Not least because it worked for me too :)

                                – Owen Blacker
                                Jul 3 '14 at 0:04













                              • @OwenBlacker thanks. But because there are lots of answers already, mine will get lost. And this answer is quite good, it's just that if it doesn't work then my comment "completes" it. You know what? I guess I'll just edit the original answer. More important than gaining own rep.

                                – Ofer Zelig
                                Jul 4 '14 at 0:04






                              • 39





                                BE AWARE that the command posted in the answer will reinstall the package in every project in your solution. So if you use the Newtonsoft.Json package in several projects and maybe use different versions, just executing the above command might have unwanted consequences.

                                – René
                                Jul 10 '14 at 11:09













                              • Solved! For me, I had v6 installed in one project, reinstalling from package manager brought it up to v7.

                                – alias65536
                                Jul 20 '15 at 19:13








                              7




                              7





                              For the sake of everyone reading this: I've done that and still got the error. Then I solved it somehow: Amazingly, I had to delete Json.Net's <dependentAssembly> section from my .config file. Reinstall brings it back if it's not there and apparently you need to delete it. Until there will be a normal solution in the package itself, I'm afraid this manual step is a must.

                              – Ofer Zelig
                              Jun 27 '14 at 0:36





                              For the sake of everyone reading this: I've done that and still got the error. Then I solved it somehow: Amazingly, I had to delete Json.Net's <dependentAssembly> section from my .config file. Reinstall brings it back if it's not there and apparently you need to delete it. Until there will be a normal solution in the package itself, I'm afraid this manual step is a must.

                              – Ofer Zelig
                              Jun 27 '14 at 0:36













                              @OferZelig You should post that as a separate answer, so it can get the upvotes (and, more importantly, increased attention). Not least because it worked for me too :)

                              – Owen Blacker
                              Jul 3 '14 at 0:04







                              @OferZelig You should post that as a separate answer, so it can get the upvotes (and, more importantly, increased attention). Not least because it worked for me too :)

                              – Owen Blacker
                              Jul 3 '14 at 0:04















                              @OwenBlacker thanks. But because there are lots of answers already, mine will get lost. And this answer is quite good, it's just that if it doesn't work then my comment "completes" it. You know what? I guess I'll just edit the original answer. More important than gaining own rep.

                              – Ofer Zelig
                              Jul 4 '14 at 0:04





                              @OwenBlacker thanks. But because there are lots of answers already, mine will get lost. And this answer is quite good, it's just that if it doesn't work then my comment "completes" it. You know what? I guess I'll just edit the original answer. More important than gaining own rep.

                              – Ofer Zelig
                              Jul 4 '14 at 0:04




                              39




                              39





                              BE AWARE that the command posted in the answer will reinstall the package in every project in your solution. So if you use the Newtonsoft.Json package in several projects and maybe use different versions, just executing the above command might have unwanted consequences.

                              – René
                              Jul 10 '14 at 11:09







                              BE AWARE that the command posted in the answer will reinstall the package in every project in your solution. So if you use the Newtonsoft.Json package in several projects and maybe use different versions, just executing the above command might have unwanted consequences.

                              – René
                              Jul 10 '14 at 11:09















                              Solved! For me, I had v6 installed in one project, reinstalling from package manager brought it up to v7.

                              – alias65536
                              Jul 20 '15 at 19:13





                              Solved! For me, I had v6 installed in one project, reinstalling from package manager brought it up to v7.

                              – alias65536
                              Jul 20 '15 at 19:13













                              114














                              To everyone having problems with Newtonsoft.Json v4.5 version try using this in web.config or app.config:



                              <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>


                              IMPORTANT: Check that the configuration tag of your config file has no namespace attribute (as suggested in https://stackoverflow.com/a/12011221/150370). Otherwise, assemblyBinding tags will be ignored.






                              share|improve this answer





















                              • 3





                                for me, deleting the content of the bin folder manually after cleaning (which does not empty it) did the trick after I applied this answer.

                                – Mikaël Mayer
                                Oct 2 '14 at 8:27











                              • Thanks a ton for this! :)

                                – Kamron K.
                                Jan 8 '15 at 5:53











                              • Tried this didn't work for me :(

                                – PUG
                                Apr 1 '15 at 17:55











                              • This did the trick for me!

                                – Steven Ryssaert
                                Jun 3 '15 at 0:10






                              • 1





                                That note on the namespace...I could hug you. I burned hours on this not knowing the binding redirects were being ignored because of that.

                                – Brian
                                Nov 10 '16 at 14:55
















                              114














                              To everyone having problems with Newtonsoft.Json v4.5 version try using this in web.config or app.config:



                              <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>


                              IMPORTANT: Check that the configuration tag of your config file has no namespace attribute (as suggested in https://stackoverflow.com/a/12011221/150370). Otherwise, assemblyBinding tags will be ignored.






                              share|improve this answer





















                              • 3





                                for me, deleting the content of the bin folder manually after cleaning (which does not empty it) did the trick after I applied this answer.

                                – Mikaël Mayer
                                Oct 2 '14 at 8:27











                              • Thanks a ton for this! :)

                                – Kamron K.
                                Jan 8 '15 at 5:53











                              • Tried this didn't work for me :(

                                – PUG
                                Apr 1 '15 at 17:55











                              • This did the trick for me!

                                – Steven Ryssaert
                                Jun 3 '15 at 0:10






                              • 1





                                That note on the namespace...I could hug you. I burned hours on this not knowing the binding redirects were being ignored because of that.

                                – Brian
                                Nov 10 '16 at 14:55














                              114












                              114








                              114







                              To everyone having problems with Newtonsoft.Json v4.5 version try using this in web.config or app.config:



                              <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>


                              IMPORTANT: Check that the configuration tag of your config file has no namespace attribute (as suggested in https://stackoverflow.com/a/12011221/150370). Otherwise, assemblyBinding tags will be ignored.






                              share|improve this answer















                              To everyone having problems with Newtonsoft.Json v4.5 version try using this in web.config or app.config:



                              <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>


                              IMPORTANT: Check that the configuration tag of your config file has no namespace attribute (as suggested in https://stackoverflow.com/a/12011221/150370). Otherwise, assemblyBinding tags will be ignored.







                              share|improve this answer














                              share|improve this answer



                              share|improve this answer








                              edited May 23 '17 at 12:26









                              Community

                              11




                              11










                              answered Jun 27 '14 at 21:32









                              ZeroDotNetZeroDotNet

                              1,6021125




                              1,6021125








                              • 3





                                for me, deleting the content of the bin folder manually after cleaning (which does not empty it) did the trick after I applied this answer.

                                – Mikaël Mayer
                                Oct 2 '14 at 8:27











                              • Thanks a ton for this! :)

                                – Kamron K.
                                Jan 8 '15 at 5:53











                              • Tried this didn't work for me :(

                                – PUG
                                Apr 1 '15 at 17:55











                              • This did the trick for me!

                                – Steven Ryssaert
                                Jun 3 '15 at 0:10






                              • 1





                                That note on the namespace...I could hug you. I burned hours on this not knowing the binding redirects were being ignored because of that.

                                – Brian
                                Nov 10 '16 at 14:55














                              • 3





                                for me, deleting the content of the bin folder manually after cleaning (which does not empty it) did the trick after I applied this answer.

                                – Mikaël Mayer
                                Oct 2 '14 at 8:27











                              • Thanks a ton for this! :)

                                – Kamron K.
                                Jan 8 '15 at 5:53











                              • Tried this didn't work for me :(

                                – PUG
                                Apr 1 '15 at 17:55











                              • This did the trick for me!

                                – Steven Ryssaert
                                Jun 3 '15 at 0:10






                              • 1





                                That note on the namespace...I could hug you. I burned hours on this not knowing the binding redirects were being ignored because of that.

                                – Brian
                                Nov 10 '16 at 14:55








                              3




                              3





                              for me, deleting the content of the bin folder manually after cleaning (which does not empty it) did the trick after I applied this answer.

                              – Mikaël Mayer
                              Oct 2 '14 at 8:27





                              for me, deleting the content of the bin folder manually after cleaning (which does not empty it) did the trick after I applied this answer.

                              – Mikaël Mayer
                              Oct 2 '14 at 8:27













                              Thanks a ton for this! :)

                              – Kamron K.
                              Jan 8 '15 at 5:53





                              Thanks a ton for this! :)

                              – Kamron K.
                              Jan 8 '15 at 5:53













                              Tried this didn't work for me :(

                              – PUG
                              Apr 1 '15 at 17:55





                              Tried this didn't work for me :(

                              – PUG
                              Apr 1 '15 at 17:55













                              This did the trick for me!

                              – Steven Ryssaert
                              Jun 3 '15 at 0:10





                              This did the trick for me!

                              – Steven Ryssaert
                              Jun 3 '15 at 0:10




                              1




                              1





                              That note on the namespace...I could hug you. I burned hours on this not knowing the binding redirects were being ignored because of that.

                              – Brian
                              Nov 10 '16 at 14:55





                              That note on the namespace...I could hug you. I burned hours on this not knowing the binding redirects were being ignored because of that.

                              – Brian
                              Nov 10 '16 at 14:55











                              37














                              The key point is referencing right version in your config file.



                              Steps;



                              1- look at what is the version of your Newtonsoft.Json.dll in the project reference property what ever the version in your package folder (For example mine is 7.0.1 and the reference Version is 7.0.0.0)



                              2- look at what the project expect from you in the exception (mine is 6.0.0.0)



                              3- Add dependent assembly to your config file as it should be..



                                <dependentAssembly>
                              <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30AD4FE6B2A6AEED" culture="neutral"/>
                              <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="7.0.0.0"/>
                              </dependentAssembly>





                              share|improve this answer


























                              • Sorry can give only one vote your point (For example mine is 7.0.1 and the referance Version is 7.0.0.0) made a huge difference. I would have given more.....Thanks :)

                                – Zaker
                                Dec 8 '15 at 7:43











                              • This worked for me. I updated the version to 7, but it was really running version 8 so I just changed the newVersion to 8.0, thanks!

                                – Keith
                                Mar 9 '16 at 13:12











                              • Even though installing 8.0.3 (like it says in nuget package manager), the .dll under references is still 8.0.0. So I changed to 8.0.0.0 in my web.config. Wierd how this worked yesterday when I published everything and this morning it does not work anymore.

                                – CularBytes
                                Apr 25 '16 at 7:39
















                              37














                              The key point is referencing right version in your config file.



                              Steps;



                              1- look at what is the version of your Newtonsoft.Json.dll in the project reference property what ever the version in your package folder (For example mine is 7.0.1 and the reference Version is 7.0.0.0)



                              2- look at what the project expect from you in the exception (mine is 6.0.0.0)



                              3- Add dependent assembly to your config file as it should be..



                                <dependentAssembly>
                              <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30AD4FE6B2A6AEED" culture="neutral"/>
                              <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="7.0.0.0"/>
                              </dependentAssembly>





                              share|improve this answer


























                              • Sorry can give only one vote your point (For example mine is 7.0.1 and the referance Version is 7.0.0.0) made a huge difference. I would have given more.....Thanks :)

                                – Zaker
                                Dec 8 '15 at 7:43











                              • This worked for me. I updated the version to 7, but it was really running version 8 so I just changed the newVersion to 8.0, thanks!

                                – Keith
                                Mar 9 '16 at 13:12











                              • Even though installing 8.0.3 (like it says in nuget package manager), the .dll under references is still 8.0.0. So I changed to 8.0.0.0 in my web.config. Wierd how this worked yesterday when I published everything and this morning it does not work anymore.

                                – CularBytes
                                Apr 25 '16 at 7:39














                              37












                              37








                              37







                              The key point is referencing right version in your config file.



                              Steps;



                              1- look at what is the version of your Newtonsoft.Json.dll in the project reference property what ever the version in your package folder (For example mine is 7.0.1 and the reference Version is 7.0.0.0)



                              2- look at what the project expect from you in the exception (mine is 6.0.0.0)



                              3- Add dependent assembly to your config file as it should be..



                                <dependentAssembly>
                              <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30AD4FE6B2A6AEED" culture="neutral"/>
                              <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="7.0.0.0"/>
                              </dependentAssembly>





                              share|improve this answer















                              The key point is referencing right version in your config file.



                              Steps;



                              1- look at what is the version of your Newtonsoft.Json.dll in the project reference property what ever the version in your package folder (For example mine is 7.0.1 and the reference Version is 7.0.0.0)



                              2- look at what the project expect from you in the exception (mine is 6.0.0.0)



                              3- Add dependent assembly to your config file as it should be..



                                <dependentAssembly>
                              <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30AD4FE6B2A6AEED" culture="neutral"/>
                              <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="7.0.0.0"/>
                              </dependentAssembly>






                              share|improve this answer














                              share|improve this answer



                              share|improve this answer








                              edited Apr 4 '18 at 11:47

























                              answered Jul 14 '15 at 10:22









                              Kadir CanKadir Can

                              66469




                              66469













                              • Sorry can give only one vote your point (For example mine is 7.0.1 and the referance Version is 7.0.0.0) made a huge difference. I would have given more.....Thanks :)

                                – Zaker
                                Dec 8 '15 at 7:43











                              • This worked for me. I updated the version to 7, but it was really running version 8 so I just changed the newVersion to 8.0, thanks!

                                – Keith
                                Mar 9 '16 at 13:12











                              • Even though installing 8.0.3 (like it says in nuget package manager), the .dll under references is still 8.0.0. So I changed to 8.0.0.0 in my web.config. Wierd how this worked yesterday when I published everything and this morning it does not work anymore.

                                – CularBytes
                                Apr 25 '16 at 7:39



















                              • Sorry can give only one vote your point (For example mine is 7.0.1 and the referance Version is 7.0.0.0) made a huge difference. I would have given more.....Thanks :)

                                – Zaker
                                Dec 8 '15 at 7:43











                              • This worked for me. I updated the version to 7, but it was really running version 8 so I just changed the newVersion to 8.0, thanks!

                                – Keith
                                Mar 9 '16 at 13:12











                              • Even though installing 8.0.3 (like it says in nuget package manager), the .dll under references is still 8.0.0. So I changed to 8.0.0.0 in my web.config. Wierd how this worked yesterday when I published everything and this morning it does not work anymore.

                                – CularBytes
                                Apr 25 '16 at 7:39

















                              Sorry can give only one vote your point (For example mine is 7.0.1 and the referance Version is 7.0.0.0) made a huge difference. I would have given more.....Thanks :)

                              – Zaker
                              Dec 8 '15 at 7:43





                              Sorry can give only one vote your point (For example mine is 7.0.1 and the referance Version is 7.0.0.0) made a huge difference. I would have given more.....Thanks :)

                              – Zaker
                              Dec 8 '15 at 7:43













                              This worked for me. I updated the version to 7, but it was really running version 8 so I just changed the newVersion to 8.0, thanks!

                              – Keith
                              Mar 9 '16 at 13:12





                              This worked for me. I updated the version to 7, but it was really running version 8 so I just changed the newVersion to 8.0, thanks!

                              – Keith
                              Mar 9 '16 at 13:12













                              Even though installing 8.0.3 (like it says in nuget package manager), the .dll under references is still 8.0.0. So I changed to 8.0.0.0 in my web.config. Wierd how this worked yesterday when I published everything and this morning it does not work anymore.

                              – CularBytes
                              Apr 25 '16 at 7:39





                              Even though installing 8.0.3 (like it says in nuget package manager), the .dll under references is still 8.0.0. So I changed to 8.0.0.0 in my web.config. Wierd how this worked yesterday when I published everything and this morning it does not work anymore.

                              – CularBytes
                              Apr 25 '16 at 7:39











                              24














                              I had no luck with any of the solutions presented here (uninstalling, reinstalling, deleting references, creating bindingRedirects etc.) I had to go back to an old version of Newtonsoft. Version 5.0.6 had been working before, so I tried that one. I had to enter these two commands in the Package Console:



                              uninstall-package newtonsoft.json -force



                              install-package newtonsoft.json -version "5.0.6"



                              The -force option in the first command is required to force the uninstall. Dependencies with other assemblies prevent the uninstall without it.






                              share|improve this answer


























                              • This solution worked, Thanks

                                – PUG
                                Apr 1 '15 at 20:08











                              • Worked like a charm. Had the error in my MVC 4 project. Almost switched to the native serializer.

                                – Kees C. Bakker
                                May 31 '15 at 19:41













                              • Thank you so much!!

                                – Ashish
                                Jul 24 '15 at 4:52











                              • thanks, I just needed to change -version "5.0.6" to -pre: install-package newtonsoft.json -pre

                                – thiago.adriano26
                                Oct 24 '15 at 12:21


















                              24














                              I had no luck with any of the solutions presented here (uninstalling, reinstalling, deleting references, creating bindingRedirects etc.) I had to go back to an old version of Newtonsoft. Version 5.0.6 had been working before, so I tried that one. I had to enter these two commands in the Package Console:



                              uninstall-package newtonsoft.json -force



                              install-package newtonsoft.json -version "5.0.6"



                              The -force option in the first command is required to force the uninstall. Dependencies with other assemblies prevent the uninstall without it.






                              share|improve this answer


























                              • This solution worked, Thanks

                                – PUG
                                Apr 1 '15 at 20:08











                              • Worked like a charm. Had the error in my MVC 4 project. Almost switched to the native serializer.

                                – Kees C. Bakker
                                May 31 '15 at 19:41













                              • Thank you so much!!

                                – Ashish
                                Jul 24 '15 at 4:52











                              • thanks, I just needed to change -version "5.0.6" to -pre: install-package newtonsoft.json -pre

                                – thiago.adriano26
                                Oct 24 '15 at 12:21
















                              24












                              24








                              24







                              I had no luck with any of the solutions presented here (uninstalling, reinstalling, deleting references, creating bindingRedirects etc.) I had to go back to an old version of Newtonsoft. Version 5.0.6 had been working before, so I tried that one. I had to enter these two commands in the Package Console:



                              uninstall-package newtonsoft.json -force



                              install-package newtonsoft.json -version "5.0.6"



                              The -force option in the first command is required to force the uninstall. Dependencies with other assemblies prevent the uninstall without it.






                              share|improve this answer















                              I had no luck with any of the solutions presented here (uninstalling, reinstalling, deleting references, creating bindingRedirects etc.) I had to go back to an old version of Newtonsoft. Version 5.0.6 had been working before, so I tried that one. I had to enter these two commands in the Package Console:



                              uninstall-package newtonsoft.json -force



                              install-package newtonsoft.json -version "5.0.6"



                              The -force option in the first command is required to force the uninstall. Dependencies with other assemblies prevent the uninstall without it.







                              share|improve this answer














                              share|improve this answer



                              share|improve this answer








                              edited Sep 20 '14 at 18:22









                              Lucas Zamboulis

                              2,42152026




                              2,42152026










                              answered Sep 20 '14 at 18:12









                              Karl HoaglundKarl Hoaglund

                              40769




                              40769













                              • This solution worked, Thanks

                                – PUG
                                Apr 1 '15 at 20:08











                              • Worked like a charm. Had the error in my MVC 4 project. Almost switched to the native serializer.

                                – Kees C. Bakker
                                May 31 '15 at 19:41













                              • Thank you so much!!

                                – Ashish
                                Jul 24 '15 at 4:52











                              • thanks, I just needed to change -version "5.0.6" to -pre: install-package newtonsoft.json -pre

                                – thiago.adriano26
                                Oct 24 '15 at 12:21





















                              • This solution worked, Thanks

                                – PUG
                                Apr 1 '15 at 20:08











                              • Worked like a charm. Had the error in my MVC 4 project. Almost switched to the native serializer.

                                – Kees C. Bakker
                                May 31 '15 at 19:41













                              • Thank you so much!!

                                – Ashish
                                Jul 24 '15 at 4:52











                              • thanks, I just needed to change -version "5.0.6" to -pre: install-package newtonsoft.json -pre

                                – thiago.adriano26
                                Oct 24 '15 at 12:21



















                              This solution worked, Thanks

                              – PUG
                              Apr 1 '15 at 20:08





                              This solution worked, Thanks

                              – PUG
                              Apr 1 '15 at 20:08













                              Worked like a charm. Had the error in my MVC 4 project. Almost switched to the native serializer.

                              – Kees C. Bakker
                              May 31 '15 at 19:41







                              Worked like a charm. Had the error in my MVC 4 project. Almost switched to the native serializer.

                              – Kees C. Bakker
                              May 31 '15 at 19:41















                              Thank you so much!!

                              – Ashish
                              Jul 24 '15 at 4:52





                              Thank you so much!!

                              – Ashish
                              Jul 24 '15 at 4:52













                              thanks, I just needed to change -version "5.0.6" to -pre: install-package newtonsoft.json -pre

                              – thiago.adriano26
                              Oct 24 '15 at 12:21







                              thanks, I just needed to change -version "5.0.6" to -pre: install-package newtonsoft.json -pre

                              – thiago.adriano26
                              Oct 24 '15 at 12:21













                              21














                              I fixed the problem adding this binding redirect to my .config file:



                              <runtime>
                              . . .
                              <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
                              <dependentAssembly>
                              <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed"
                              culture="neutral" />
                              <bindingRedirect oldVersion="4.5.0.0" newVersion="6.0.0.0" />
                              </dependentAssembly>
                              </assemblyBinding>
                              </runtime>


                              The error message complains about not finding version 4.5.0.0, the current version of Newtonsoft.Json is 6.0.0.0 so the redirect should go from 4.5 to 6.0, not viceversa






                              share|improve this answer
























                              • Yes this solved my problem. So strange the amount of issues JSON.NET causes.. but once it goes its a dream machine. Thanks +1

                                – ppumkin
                                Jul 21 '16 at 20:27











                              • Your code snippet made me realize was missing 'assemblyBinding' element. Thanks

                                – Riga
                                Feb 22 '17 at 6:32
















                              21














                              I fixed the problem adding this binding redirect to my .config file:



                              <runtime>
                              . . .
                              <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
                              <dependentAssembly>
                              <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed"
                              culture="neutral" />
                              <bindingRedirect oldVersion="4.5.0.0" newVersion="6.0.0.0" />
                              </dependentAssembly>
                              </assemblyBinding>
                              </runtime>


                              The error message complains about not finding version 4.5.0.0, the current version of Newtonsoft.Json is 6.0.0.0 so the redirect should go from 4.5 to 6.0, not viceversa






                              share|improve this answer
























                              • Yes this solved my problem. So strange the amount of issues JSON.NET causes.. but once it goes its a dream machine. Thanks +1

                                – ppumkin
                                Jul 21 '16 at 20:27











                              • Your code snippet made me realize was missing 'assemblyBinding' element. Thanks

                                – Riga
                                Feb 22 '17 at 6:32














                              21












                              21








                              21







                              I fixed the problem adding this binding redirect to my .config file:



                              <runtime>
                              . . .
                              <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
                              <dependentAssembly>
                              <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed"
                              culture="neutral" />
                              <bindingRedirect oldVersion="4.5.0.0" newVersion="6.0.0.0" />
                              </dependentAssembly>
                              </assemblyBinding>
                              </runtime>


                              The error message complains about not finding version 4.5.0.0, the current version of Newtonsoft.Json is 6.0.0.0 so the redirect should go from 4.5 to 6.0, not viceversa






                              share|improve this answer













                              I fixed the problem adding this binding redirect to my .config file:



                              <runtime>
                              . . .
                              <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
                              <dependentAssembly>
                              <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed"
                              culture="neutral" />
                              <bindingRedirect oldVersion="4.5.0.0" newVersion="6.0.0.0" />
                              </dependentAssembly>
                              </assemblyBinding>
                              </runtime>


                              The error message complains about not finding version 4.5.0.0, the current version of Newtonsoft.Json is 6.0.0.0 so the redirect should go from 4.5 to 6.0, not viceversa







                              share|improve this answer












                              share|improve this answer



                              share|improve this answer










                              answered Nov 19 '14 at 16:26









                              MiMoMiMo

                              10.5k12442




                              10.5k12442













                              • Yes this solved my problem. So strange the amount of issues JSON.NET causes.. but once it goes its a dream machine. Thanks +1

                                – ppumkin
                                Jul 21 '16 at 20:27











                              • Your code snippet made me realize was missing 'assemblyBinding' element. Thanks

                                – Riga
                                Feb 22 '17 at 6:32



















                              • Yes this solved my problem. So strange the amount of issues JSON.NET causes.. but once it goes its a dream machine. Thanks +1

                                – ppumkin
                                Jul 21 '16 at 20:27











                              • Your code snippet made me realize was missing 'assemblyBinding' element. Thanks

                                – Riga
                                Feb 22 '17 at 6:32

















                              Yes this solved my problem. So strange the amount of issues JSON.NET causes.. but once it goes its a dream machine. Thanks +1

                              – ppumkin
                              Jul 21 '16 at 20:27





                              Yes this solved my problem. So strange the amount of issues JSON.NET causes.. but once it goes its a dream machine. Thanks +1

                              – ppumkin
                              Jul 21 '16 at 20:27













                              Your code snippet made me realize was missing 'assemblyBinding' element. Thanks

                              – Riga
                              Feb 22 '17 at 6:32





                              Your code snippet made me realize was missing 'assemblyBinding' element. Thanks

                              – Riga
                              Feb 22 '17 at 6:32











                              19














                              I think you are pointing to the wrong target, change it to 4.5 instead of 6.0



                              <dependentAssembly>
                              <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed"
                              culture="neutral" />
                              <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="4.5.0.0" />
                              </dependentAssembly>


                              This should work.






                              share|improve this answer





















                              • 1





                                Umbraco 7 required 4.5.0.0, so this helped get it up and running

                                – MagicalArmchair
                                Jan 13 '15 at 16:53
















                              19














                              I think you are pointing to the wrong target, change it to 4.5 instead of 6.0



                              <dependentAssembly>
                              <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed"
                              culture="neutral" />
                              <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="4.5.0.0" />
                              </dependentAssembly>


                              This should work.






                              share|improve this answer





















                              • 1





                                Umbraco 7 required 4.5.0.0, so this helped get it up and running

                                – MagicalArmchair
                                Jan 13 '15 at 16:53














                              19












                              19








                              19







                              I think you are pointing to the wrong target, change it to 4.5 instead of 6.0



                              <dependentAssembly>
                              <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed"
                              culture="neutral" />
                              <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="4.5.0.0" />
                              </dependentAssembly>


                              This should work.






                              share|improve this answer















                              I think you are pointing to the wrong target, change it to 4.5 instead of 6.0



                              <dependentAssembly>
                              <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed"
                              culture="neutral" />
                              <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="4.5.0.0" />
                              </dependentAssembly>


                              This should work.







                              share|improve this answer














                              share|improve this answer



                              share|improve this answer








                              edited Jul 3 '14 at 0:04









                              Owen Blacker

                              3,14212866




                              3,14212866










                              answered Apr 10 '14 at 18:17









                              BrunoLMBrunoLM

                              60.9k67228390




                              60.9k67228390








                              • 1





                                Umbraco 7 required 4.5.0.0, so this helped get it up and running

                                – MagicalArmchair
                                Jan 13 '15 at 16:53














                              • 1





                                Umbraco 7 required 4.5.0.0, so this helped get it up and running

                                – MagicalArmchair
                                Jan 13 '15 at 16:53








                              1




                              1





                              Umbraco 7 required 4.5.0.0, so this helped get it up and running

                              – MagicalArmchair
                              Jan 13 '15 at 16:53





                              Umbraco 7 required 4.5.0.0, so this helped get it up and running

                              – MagicalArmchair
                              Jan 13 '15 at 16:53











                              18














                              I've spend couple of days trying to resolve this frustrating issue. I've tried pretty much everything that can be found on the web. Finally I found that this error could be caused (like in my case) by the different target .Net project versions (4.5 and 4.5.1) in one solution. The steps bellow fixed it for me:




                              1. Double check the .Net version of every project that's in your solution. Just right click on project and go to Properties.


                              enter image description here




                              1. If possible set the same .Net version for all projects. If not at least try to change the Startup project one (for me this was the one causing the issues).



                              2. Remove all Newtonsoft.Json packs from the solution.



                                uninstall-package newtonsoft.json -force




                              3. Update all Newtonsoft.Json versions in all packages.config files, like so



                                <package id="Newtonsoft.Json" version="7.0.1" targetFramework="net451" />




                              4. Reinstall Newtonsoft.Json from "Package Manager Console" with:



                                install-package newtonsoft.json



                              5. Rebuild the solution



                              (Optional) 7. If you changed the Startup project, return it again






                              share|improve this answer






























                                18














                                I've spend couple of days trying to resolve this frustrating issue. I've tried pretty much everything that can be found on the web. Finally I found that this error could be caused (like in my case) by the different target .Net project versions (4.5 and 4.5.1) in one solution. The steps bellow fixed it for me:




                                1. Double check the .Net version of every project that's in your solution. Just right click on project and go to Properties.


                                enter image description here




                                1. If possible set the same .Net version for all projects. If not at least try to change the Startup project one (for me this was the one causing the issues).



                                2. Remove all Newtonsoft.Json packs from the solution.



                                  uninstall-package newtonsoft.json -force




                                3. Update all Newtonsoft.Json versions in all packages.config files, like so



                                  <package id="Newtonsoft.Json" version="7.0.1" targetFramework="net451" />




                                4. Reinstall Newtonsoft.Json from "Package Manager Console" with:



                                  install-package newtonsoft.json



                                5. Rebuild the solution



                                (Optional) 7. If you changed the Startup project, return it again






                                share|improve this answer




























                                  18












                                  18








                                  18







                                  I've spend couple of days trying to resolve this frustrating issue. I've tried pretty much everything that can be found on the web. Finally I found that this error could be caused (like in my case) by the different target .Net project versions (4.5 and 4.5.1) in one solution. The steps bellow fixed it for me:




                                  1. Double check the .Net version of every project that's in your solution. Just right click on project and go to Properties.


                                  enter image description here




                                  1. If possible set the same .Net version for all projects. If not at least try to change the Startup project one (for me this was the one causing the issues).



                                  2. Remove all Newtonsoft.Json packs from the solution.



                                    uninstall-package newtonsoft.json -force




                                  3. Update all Newtonsoft.Json versions in all packages.config files, like so



                                    <package id="Newtonsoft.Json" version="7.0.1" targetFramework="net451" />




                                  4. Reinstall Newtonsoft.Json from "Package Manager Console" with:



                                    install-package newtonsoft.json



                                  5. Rebuild the solution



                                  (Optional) 7. If you changed the Startup project, return it again






                                  share|improve this answer















                                  I've spend couple of days trying to resolve this frustrating issue. I've tried pretty much everything that can be found on the web. Finally I found that this error could be caused (like in my case) by the different target .Net project versions (4.5 and 4.5.1) in one solution. The steps bellow fixed it for me:




                                  1. Double check the .Net version of every project that's in your solution. Just right click on project and go to Properties.


                                  enter image description here




                                  1. If possible set the same .Net version for all projects. If not at least try to change the Startup project one (for me this was the one causing the issues).



                                  2. Remove all Newtonsoft.Json packs from the solution.



                                    uninstall-package newtonsoft.json -force




                                  3. Update all Newtonsoft.Json versions in all packages.config files, like so



                                    <package id="Newtonsoft.Json" version="7.0.1" targetFramework="net451" />




                                  4. Reinstall Newtonsoft.Json from "Package Manager Console" with:



                                    install-package newtonsoft.json



                                  5. Rebuild the solution



                                  (Optional) 7. If you changed the Startup project, return it again







                                  share|improve this answer














                                  share|improve this answer



                                  share|improve this answer








                                  edited Feb 14 '16 at 21:51

























                                  answered Aug 14 '15 at 8:39









                                  ekostadinovekostadinov

                                  5,70621941




                                  5,70621941























                                      11














                                      uninstall-package newtonsoft.json -force
                                      install-package newtonsoft.json


                                      Did the trick for me :)






                                      share|improve this answer





















                                      • 1





                                        this did the trick for me too. it automatically updated the webconfig file to the correct version.

                                        – Shaakir
                                        Jul 19 '16 at 9:48











                                      • Me too, this really helped.

                                        – MikeMalter
                                        Oct 17 '17 at 23:04
















                                      11














                                      uninstall-package newtonsoft.json -force
                                      install-package newtonsoft.json


                                      Did the trick for me :)






                                      share|improve this answer





















                                      • 1





                                        this did the trick for me too. it automatically updated the webconfig file to the correct version.

                                        – Shaakir
                                        Jul 19 '16 at 9:48











                                      • Me too, this really helped.

                                        – MikeMalter
                                        Oct 17 '17 at 23:04














                                      11












                                      11








                                      11







                                      uninstall-package newtonsoft.json -force
                                      install-package newtonsoft.json


                                      Did the trick for me :)






                                      share|improve this answer















                                      uninstall-package newtonsoft.json -force
                                      install-package newtonsoft.json


                                      Did the trick for me :)







                                      share|improve this answer














                                      share|improve this answer



                                      share|improve this answer








                                      edited Jan 25 '16 at 3:16









                                      Druid

                                      5,70932848




                                      5,70932848










                                      answered Mar 27 '15 at 18:43









                                      ChiranjeebChiranjeeb

                                      12114




                                      12114








                                      • 1





                                        this did the trick for me too. it automatically updated the webconfig file to the correct version.

                                        – Shaakir
                                        Jul 19 '16 at 9:48











                                      • Me too, this really helped.

                                        – MikeMalter
                                        Oct 17 '17 at 23:04














                                      • 1





                                        this did the trick for me too. it automatically updated the webconfig file to the correct version.

                                        – Shaakir
                                        Jul 19 '16 at 9:48











                                      • Me too, this really helped.

                                        – MikeMalter
                                        Oct 17 '17 at 23:04








                                      1




                                      1





                                      this did the trick for me too. it automatically updated the webconfig file to the correct version.

                                      – Shaakir
                                      Jul 19 '16 at 9:48





                                      this did the trick for me too. it automatically updated the webconfig file to the correct version.

                                      – Shaakir
                                      Jul 19 '16 at 9:48













                                      Me too, this really helped.

                                      – MikeMalter
                                      Oct 17 '17 at 23:04





                                      Me too, this really helped.

                                      – MikeMalter
                                      Oct 17 '17 at 23:04











                                      9














                                      Remove the Newtonsoft.Json assembly from the project reference and add it again. You probably deleted or replaced the dll by accident.






                                      share|improve this answer
























                                      • Thanks..tried that still getting same issue

                                        – user3437755
                                        Mar 20 '14 at 10:27











                                      • This approached works against a Xamarin Forms iOS project where I dropped the NuGet package and re-added it. Thanks.

                                        – The Senator
                                        Nov 30 '16 at 12:17
















                                      9














                                      Remove the Newtonsoft.Json assembly from the project reference and add it again. You probably deleted or replaced the dll by accident.






                                      share|improve this answer
























                                      • Thanks..tried that still getting same issue

                                        – user3437755
                                        Mar 20 '14 at 10:27











                                      • This approached works against a Xamarin Forms iOS project where I dropped the NuGet package and re-added it. Thanks.

                                        – The Senator
                                        Nov 30 '16 at 12:17














                                      9












                                      9








                                      9







                                      Remove the Newtonsoft.Json assembly from the project reference and add it again. You probably deleted or replaced the dll by accident.






                                      share|improve this answer













                                      Remove the Newtonsoft.Json assembly from the project reference and add it again. You probably deleted or replaced the dll by accident.







                                      share|improve this answer












                                      share|improve this answer



                                      share|improve this answer










                                      answered Mar 19 '14 at 13:25









                                      helbhelb

                                      5,97672851




                                      5,97672851













                                      • Thanks..tried that still getting same issue

                                        – user3437755
                                        Mar 20 '14 at 10:27











                                      • This approached works against a Xamarin Forms iOS project where I dropped the NuGet package and re-added it. Thanks.

                                        – The Senator
                                        Nov 30 '16 at 12:17



















                                      • Thanks..tried that still getting same issue

                                        – user3437755
                                        Mar 20 '14 at 10:27











                                      • This approached works against a Xamarin Forms iOS project where I dropped the NuGet package and re-added it. Thanks.

                                        – The Senator
                                        Nov 30 '16 at 12:17

















                                      Thanks..tried that still getting same issue

                                      – user3437755
                                      Mar 20 '14 at 10:27





                                      Thanks..tried that still getting same issue

                                      – user3437755
                                      Mar 20 '14 at 10:27













                                      This approached works against a Xamarin Forms iOS project where I dropped the NuGet package and re-added it. Thanks.

                                      – The Senator
                                      Nov 30 '16 at 12:17





                                      This approached works against a Xamarin Forms iOS project where I dropped the NuGet package and re-added it. Thanks.

                                      – The Senator
                                      Nov 30 '16 at 12:17











                                      9














                                      I was writing a WebApi REST service client, so for me this error was caused by adding References to the System.Net.Http and System.Net.Http.Formatting assemblies manually via Add Reference, when I should have added the Microsoft.AspNet.WebApi.Client package via NuGet.
                                      See also this answer to another question.






                                      share|improve this answer






























                                        9














                                        I was writing a WebApi REST service client, so for me this error was caused by adding References to the System.Net.Http and System.Net.Http.Formatting assemblies manually via Add Reference, when I should have added the Microsoft.AspNet.WebApi.Client package via NuGet.
                                        See also this answer to another question.






                                        share|improve this answer




























                                          9












                                          9








                                          9







                                          I was writing a WebApi REST service client, so for me this error was caused by adding References to the System.Net.Http and System.Net.Http.Formatting assemblies manually via Add Reference, when I should have added the Microsoft.AspNet.WebApi.Client package via NuGet.
                                          See also this answer to another question.






                                          share|improve this answer















                                          I was writing a WebApi REST service client, so for me this error was caused by adding References to the System.Net.Http and System.Net.Http.Formatting assemblies manually via Add Reference, when I should have added the Microsoft.AspNet.WebApi.Client package via NuGet.
                                          See also this answer to another question.







                                          share|improve this answer














                                          share|improve this answer



                                          share|improve this answer








                                          edited May 23 '17 at 12:03









                                          Community

                                          11




                                          11










                                          answered Jun 24 '15 at 21:15









                                          mschwaigmschwaig

                                          471717




                                          471717























                                              9














                                              if you using multiple project in same solution
                                              and library of the one other
                                              check is all projects has same version of Newtonsoft.Json






                                              share|improve this answer



















                                              • 1





                                                You nailed it, thank you very much

                                                – Roger Barretto
                                                Nov 7 '16 at 21:27











                                              • This was my issue. Very frustrating going through all the responses above and getting no results. Finally figured it out when I bothered to check the version of the .dll in my Build folder.

                                                – user2836056
                                                Mar 22 '18 at 17:24
















                                              9














                                              if you using multiple project in same solution
                                              and library of the one other
                                              check is all projects has same version of Newtonsoft.Json






                                              share|improve this answer



















                                              • 1





                                                You nailed it, thank you very much

                                                – Roger Barretto
                                                Nov 7 '16 at 21:27











                                              • This was my issue. Very frustrating going through all the responses above and getting no results. Finally figured it out when I bothered to check the version of the .dll in my Build folder.

                                                – user2836056
                                                Mar 22 '18 at 17:24














                                              9












                                              9








                                              9







                                              if you using multiple project in same solution
                                              and library of the one other
                                              check is all projects has same version of Newtonsoft.Json






                                              share|improve this answer













                                              if you using multiple project in same solution
                                              and library of the one other
                                              check is all projects has same version of Newtonsoft.Json







                                              share|improve this answer












                                              share|improve this answer



                                              share|improve this answer










                                              answered Jun 25 '16 at 14:32









                                              FatihFatih

                                              389511




                                              389511








                                              • 1





                                                You nailed it, thank you very much

                                                – Roger Barretto
                                                Nov 7 '16 at 21:27











                                              • This was my issue. Very frustrating going through all the responses above and getting no results. Finally figured it out when I bothered to check the version of the .dll in my Build folder.

                                                – user2836056
                                                Mar 22 '18 at 17:24














                                              • 1





                                                You nailed it, thank you very much

                                                – Roger Barretto
                                                Nov 7 '16 at 21:27











                                              • This was my issue. Very frustrating going through all the responses above and getting no results. Finally figured it out when I bothered to check the version of the .dll in my Build folder.

                                                – user2836056
                                                Mar 22 '18 at 17:24








                                              1




                                              1





                                              You nailed it, thank you very much

                                              – Roger Barretto
                                              Nov 7 '16 at 21:27





                                              You nailed it, thank you very much

                                              – Roger Barretto
                                              Nov 7 '16 at 21:27













                                              This was my issue. Very frustrating going through all the responses above and getting no results. Finally figured it out when I bothered to check the version of the .dll in my Build folder.

                                              – user2836056
                                              Mar 22 '18 at 17:24





                                              This was my issue. Very frustrating going through all the responses above and getting no results. Finally figured it out when I bothered to check the version of the .dll in my Build folder.

                                              – user2836056
                                              Mar 22 '18 at 17:24











                                              7














                                              You have 2 different versions of JSON.NET library in your solution. To solve this you should upgrade them to latest version. Follow these steps:



                                              1-Open solution explorer
                                              2-Right Click on solution name
                                              3-Select Manage Nuget Packages for Solution
                                              4-Select Updates from menu
                                              5-Update JSON.NET package



                                              This will resolve your issue.



                                              link:
                                              Could not load file or assembly 'Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies






                                              share|improve this answer
























                                              • The easiest and safest way to fix this problem. Thanks @mohammad

                                                – deanwilliammills
                                                Jun 26 '18 at 13:32
















                                              7














                                              You have 2 different versions of JSON.NET library in your solution. To solve this you should upgrade them to latest version. Follow these steps:



                                              1-Open solution explorer
                                              2-Right Click on solution name
                                              3-Select Manage Nuget Packages for Solution
                                              4-Select Updates from menu
                                              5-Update JSON.NET package



                                              This will resolve your issue.



                                              link:
                                              Could not load file or assembly 'Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies






                                              share|improve this answer
























                                              • The easiest and safest way to fix this problem. Thanks @mohammad

                                                – deanwilliammills
                                                Jun 26 '18 at 13:32














                                              7












                                              7








                                              7







                                              You have 2 different versions of JSON.NET library in your solution. To solve this you should upgrade them to latest version. Follow these steps:



                                              1-Open solution explorer
                                              2-Right Click on solution name
                                              3-Select Manage Nuget Packages for Solution
                                              4-Select Updates from menu
                                              5-Update JSON.NET package



                                              This will resolve your issue.



                                              link:
                                              Could not load file or assembly 'Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies






                                              share|improve this answer













                                              You have 2 different versions of JSON.NET library in your solution. To solve this you should upgrade them to latest version. Follow these steps:



                                              1-Open solution explorer
                                              2-Right Click on solution name
                                              3-Select Manage Nuget Packages for Solution
                                              4-Select Updates from menu
                                              5-Update JSON.NET package



                                              This will resolve your issue.



                                              link:
                                              Could not load file or assembly 'Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies







                                              share|improve this answer












                                              share|improve this answer



                                              share|improve this answer










                                              answered Mar 16 '17 at 11:24









                                              mohammadmohammad

                                              19127




                                              19127













                                              • The easiest and safest way to fix this problem. Thanks @mohammad

                                                – deanwilliammills
                                                Jun 26 '18 at 13:32



















                                              • The easiest and safest way to fix this problem. Thanks @mohammad

                                                – deanwilliammills
                                                Jun 26 '18 at 13:32

















                                              The easiest and safest way to fix this problem. Thanks @mohammad

                                              – deanwilliammills
                                              Jun 26 '18 at 13:32





                                              The easiest and safest way to fix this problem. Thanks @mohammad

                                              – deanwilliammills
                                              Jun 26 '18 at 13:32











                                              6














                                              Normally adding the binding redirect should solve this problem, but it was not working for me. After a few hours of banging my head against the wall, I realized that there was an xmlns attribute causing problems in my web.config. After removing the xmlns attribute from the configuration node in Web.config, the binding redirects worked as expected.



                                              http://www.davepaquette.com/archive/2014/10/02/could-not-load-file-or-assembly-newtonsoft-json-version4-5-0-0.aspx






                                              share|improve this answer




























                                                6














                                                Normally adding the binding redirect should solve this problem, but it was not working for me. After a few hours of banging my head against the wall, I realized that there was an xmlns attribute causing problems in my web.config. After removing the xmlns attribute from the configuration node in Web.config, the binding redirects worked as expected.



                                                http://www.davepaquette.com/archive/2014/10/02/could-not-load-file-or-assembly-newtonsoft-json-version4-5-0-0.aspx






                                                share|improve this answer


























                                                  6












                                                  6








                                                  6







                                                  Normally adding the binding redirect should solve this problem, but it was not working for me. After a few hours of banging my head against the wall, I realized that there was an xmlns attribute causing problems in my web.config. After removing the xmlns attribute from the configuration node in Web.config, the binding redirects worked as expected.



                                                  http://www.davepaquette.com/archive/2014/10/02/could-not-load-file-or-assembly-newtonsoft-json-version4-5-0-0.aspx






                                                  share|improve this answer













                                                  Normally adding the binding redirect should solve this problem, but it was not working for me. After a few hours of banging my head against the wall, I realized that there was an xmlns attribute causing problems in my web.config. After removing the xmlns attribute from the configuration node in Web.config, the binding redirects worked as expected.



                                                  http://www.davepaquette.com/archive/2014/10/02/could-not-load-file-or-assembly-newtonsoft-json-version4-5-0-0.aspx







                                                  share|improve this answer












                                                  share|improve this answer



                                                  share|improve this answer










                                                  answered Oct 3 '14 at 1:43









                                                  David PaquetteDavid Paquette

                                                  404610




                                                  404610























                                                      5














                                                      Deploy the correct version to the CI machine



                                                      This is telling you that the assembly loader found a different version of the Newtonsoft.Json assembly, that does not match the reference you created in your project. To load the assembly correctly, you must either deploy the assembly side by side with your compiled code, or install the correct version of the assembly in the destination machine (i.e. in the GAC).



                                                      Alternative: make sure the configuration is in the correct file



                                                      If you want to keep the current solution, and load an assembly with a different version, make sure that the configuration you posted is in the correct .config file. Remember that there is no xpto.dll.config, a DLL loaded by an application always uses the config file of the running application.






                                                      share|improve this answer






























                                                        5














                                                        Deploy the correct version to the CI machine



                                                        This is telling you that the assembly loader found a different version of the Newtonsoft.Json assembly, that does not match the reference you created in your project. To load the assembly correctly, you must either deploy the assembly side by side with your compiled code, or install the correct version of the assembly in the destination machine (i.e. in the GAC).



                                                        Alternative: make sure the configuration is in the correct file



                                                        If you want to keep the current solution, and load an assembly with a different version, make sure that the configuration you posted is in the correct .config file. Remember that there is no xpto.dll.config, a DLL loaded by an application always uses the config file of the running application.






                                                        share|improve this answer




























                                                          5












                                                          5








                                                          5







                                                          Deploy the correct version to the CI machine



                                                          This is telling you that the assembly loader found a different version of the Newtonsoft.Json assembly, that does not match the reference you created in your project. To load the assembly correctly, you must either deploy the assembly side by side with your compiled code, or install the correct version of the assembly in the destination machine (i.e. in the GAC).



                                                          Alternative: make sure the configuration is in the correct file



                                                          If you want to keep the current solution, and load an assembly with a different version, make sure that the configuration you posted is in the correct .config file. Remember that there is no xpto.dll.config, a DLL loaded by an application always uses the config file of the running application.






                                                          share|improve this answer















                                                          Deploy the correct version to the CI machine



                                                          This is telling you that the assembly loader found a different version of the Newtonsoft.Json assembly, that does not match the reference you created in your project. To load the assembly correctly, you must either deploy the assembly side by side with your compiled code, or install the correct version of the assembly in the destination machine (i.e. in the GAC).



                                                          Alternative: make sure the configuration is in the correct file



                                                          If you want to keep the current solution, and load an assembly with a different version, make sure that the configuration you posted is in the correct .config file. Remember that there is no xpto.dll.config, a DLL loaded by an application always uses the config file of the running application.







                                                          share|improve this answer














                                                          share|improve this answer



                                                          share|improve this answer








                                                          edited Mar 19 '14 at 13:37

























                                                          answered Mar 19 '14 at 13:31









                                                          Miguel AngeloMiguel Angelo

                                                          18k124472




                                                          18k124472























                                                              5














                                                              <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="7.0.0.0"/>
                                                              </dependentAssembly>
                                                              </assemblyBinding>




                                                              Works for me.... just put the version you are using in newVersion i.e(newVersion="7.0.0.0")






                                                              share|improve this answer


























                                                              • Had this problem some times ago and this fixed in one hit. Thank you very much.

                                                                – GutierrezDev
                                                                Sep 14 '16 at 18:40
















                                                              5














                                                              <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="7.0.0.0"/>
                                                              </dependentAssembly>
                                                              </assemblyBinding>




                                                              Works for me.... just put the version you are using in newVersion i.e(newVersion="7.0.0.0")






                                                              share|improve this answer


























                                                              • Had this problem some times ago and this fixed in one hit. Thank you very much.

                                                                – GutierrezDev
                                                                Sep 14 '16 at 18:40














                                                              5












                                                              5








                                                              5







                                                              <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="7.0.0.0"/>
                                                              </dependentAssembly>
                                                              </assemblyBinding>




                                                              Works for me.... just put the version you are using in newVersion i.e(newVersion="7.0.0.0")






                                                              share|improve this answer















                                                              <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="7.0.0.0"/>
                                                              </dependentAssembly>
                                                              </assemblyBinding>




                                                              Works for me.... just put the version you are using in newVersion i.e(newVersion="7.0.0.0")







                                                              share|improve this answer














                                                              share|improve this answer



                                                              share|improve this answer








                                                              edited Jan 25 '16 at 3:16









                                                              Druid

                                                              5,70932848




                                                              5,70932848










                                                              answered Dec 27 '15 at 19:26









                                                              aliali

                                                              5111




                                                              5111













                                                              • Had this problem some times ago and this fixed in one hit. Thank you very much.

                                                                – GutierrezDev
                                                                Sep 14 '16 at 18:40



















                                                              • Had this problem some times ago and this fixed in one hit. Thank you very much.

                                                                – GutierrezDev
                                                                Sep 14 '16 at 18:40

















                                                              Had this problem some times ago and this fixed in one hit. Thank you very much.

                                                              – GutierrezDev
                                                              Sep 14 '16 at 18:40





                                                              Had this problem some times ago and this fixed in one hit. Thank you very much.

                                                              – GutierrezDev
                                                              Sep 14 '16 at 18:40











                                                              5














                                                              Close solution.



                                                              Open packages.config and *.csproj with text editor and delete any line have Newtonsoft.Json



                                                              Ex:
                                                              <Reference Include="Newtonsoft.Json,Version=9.0.0.0,Culture=neutral,PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
                                                              <HintPath>..packagesNewtonsoft.Json.9.0.1libnet40Newtonsoft.Json.dll</HintPath>
                                                              <Private>True</Private>
                                                              </Reference>



                                                              Or
                                                              <package id="Newtonsoft.Json" version="9.0.1" targetFramework="net40" />



                                                              Open solution again and re-install Newtonsoft.Json by Install-Package Newtonsoft.Json



                                                              It work for me.






                                                              share|improve this answer


























                                                              • it works sometime but in the upcoming builds this problem came again n again

                                                                – Heemanshu Bhalla
                                                                Aug 12 '16 at 6:47











                                                              • No problem if don't update it haha. Create trash project and install Newtonsoft.Json.dll, copy it (file dll) and add to your project reference.

                                                                – Trương Quốc Khánh
                                                                Sep 24 '16 at 6:51


















                                                              5














                                                              Close solution.



                                                              Open packages.config and *.csproj with text editor and delete any line have Newtonsoft.Json



                                                              Ex:
                                                              <Reference Include="Newtonsoft.Json,Version=9.0.0.0,Culture=neutral,PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
                                                              <HintPath>..packagesNewtonsoft.Json.9.0.1libnet40Newtonsoft.Json.dll</HintPath>
                                                              <Private>True</Private>
                                                              </Reference>



                                                              Or
                                                              <package id="Newtonsoft.Json" version="9.0.1" targetFramework="net40" />



                                                              Open solution again and re-install Newtonsoft.Json by Install-Package Newtonsoft.Json



                                                              It work for me.






                                                              share|improve this answer


























                                                              • it works sometime but in the upcoming builds this problem came again n again

                                                                – Heemanshu Bhalla
                                                                Aug 12 '16 at 6:47











                                                              • No problem if don't update it haha. Create trash project and install Newtonsoft.Json.dll, copy it (file dll) and add to your project reference.

                                                                – Trương Quốc Khánh
                                                                Sep 24 '16 at 6:51
















                                                              5












                                                              5








                                                              5







                                                              Close solution.



                                                              Open packages.config and *.csproj with text editor and delete any line have Newtonsoft.Json



                                                              Ex:
                                                              <Reference Include="Newtonsoft.Json,Version=9.0.0.0,Culture=neutral,PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
                                                              <HintPath>..packagesNewtonsoft.Json.9.0.1libnet40Newtonsoft.Json.dll</HintPath>
                                                              <Private>True</Private>
                                                              </Reference>



                                                              Or
                                                              <package id="Newtonsoft.Json" version="9.0.1" targetFramework="net40" />



                                                              Open solution again and re-install Newtonsoft.Json by Install-Package Newtonsoft.Json



                                                              It work for me.






                                                              share|improve this answer















                                                              Close solution.



                                                              Open packages.config and *.csproj with text editor and delete any line have Newtonsoft.Json



                                                              Ex:
                                                              <Reference Include="Newtonsoft.Json,Version=9.0.0.0,Culture=neutral,PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
                                                              <HintPath>..packagesNewtonsoft.Json.9.0.1libnet40Newtonsoft.Json.dll</HintPath>
                                                              <Private>True</Private>
                                                              </Reference>



                                                              Or
                                                              <package id="Newtonsoft.Json" version="9.0.1" targetFramework="net40" />



                                                              Open solution again and re-install Newtonsoft.Json by Install-Package Newtonsoft.Json



                                                              It work for me.







                                                              share|improve this answer














                                                              share|improve this answer



                                                              share|improve this answer








                                                              edited Nov 22 '17 at 1:30

























                                                              answered Jul 2 '16 at 8:40









                                                              Trương Quốc KhánhTrương Quốc Khánh

                                                              106211




                                                              106211













                                                              • it works sometime but in the upcoming builds this problem came again n again

                                                                – Heemanshu Bhalla
                                                                Aug 12 '16 at 6:47











                                                              • No problem if don't update it haha. Create trash project and install Newtonsoft.Json.dll, copy it (file dll) and add to your project reference.

                                                                – Trương Quốc Khánh
                                                                Sep 24 '16 at 6:51





















                                                              • it works sometime but in the upcoming builds this problem came again n again

                                                                – Heemanshu Bhalla
                                                                Aug 12 '16 at 6:47











                                                              • No problem if don't update it haha. Create trash project and install Newtonsoft.Json.dll, copy it (file dll) and add to your project reference.

                                                                – Trương Quốc Khánh
                                                                Sep 24 '16 at 6:51



















                                                              it works sometime but in the upcoming builds this problem came again n again

                                                              – Heemanshu Bhalla
                                                              Aug 12 '16 at 6:47





                                                              it works sometime but in the upcoming builds this problem came again n again

                                                              – Heemanshu Bhalla
                                                              Aug 12 '16 at 6:47













                                                              No problem if don't update it haha. Create trash project and install Newtonsoft.Json.dll, copy it (file dll) and add to your project reference.

                                                              – Trương Quốc Khánh
                                                              Sep 24 '16 at 6:51







                                                              No problem if don't update it haha. Create trash project and install Newtonsoft.Json.dll, copy it (file dll) and add to your project reference.

                                                              – Trương Quốc Khánh
                                                              Sep 24 '16 at 6:51













                                                              4














                                                              We had the exact same issue that you mentioned. We're using nunit to run tests through CI, and we have nunit running a file called tests.nunit, which describe a list of test dll fixtures to run.



                                                              Each test fixture had their own config file, but when run through the "tests.nunit" file the binding redirects seem to be ignored. The solution was to add the binding redirects to a new config file, "tests.config" that was beside the "tests.nunit" file.






                                                              share|improve this answer
























                                                              • can you elaborate?

                                                                – KirstieBallance
                                                                Mar 8 at 21:44
















                                                              4














                                                              We had the exact same issue that you mentioned. We're using nunit to run tests through CI, and we have nunit running a file called tests.nunit, which describe a list of test dll fixtures to run.



                                                              Each test fixture had their own config file, but when run through the "tests.nunit" file the binding redirects seem to be ignored. The solution was to add the binding redirects to a new config file, "tests.config" that was beside the "tests.nunit" file.






                                                              share|improve this answer
























                                                              • can you elaborate?

                                                                – KirstieBallance
                                                                Mar 8 at 21:44














                                                              4












                                                              4








                                                              4







                                                              We had the exact same issue that you mentioned. We're using nunit to run tests through CI, and we have nunit running a file called tests.nunit, which describe a list of test dll fixtures to run.



                                                              Each test fixture had their own config file, but when run through the "tests.nunit" file the binding redirects seem to be ignored. The solution was to add the binding redirects to a new config file, "tests.config" that was beside the "tests.nunit" file.






                                                              share|improve this answer













                                                              We had the exact same issue that you mentioned. We're using nunit to run tests through CI, and we have nunit running a file called tests.nunit, which describe a list of test dll fixtures to run.



                                                              Each test fixture had their own config file, but when run through the "tests.nunit" file the binding redirects seem to be ignored. The solution was to add the binding redirects to a new config file, "tests.config" that was beside the "tests.nunit" file.







                                                              share|improve this answer












                                                              share|improve this answer



                                                              share|improve this answer










                                                              answered Apr 14 '14 at 15:00









                                                              declynedeclyne

                                                              9638




                                                              9638













                                                              • can you elaborate?

                                                                – KirstieBallance
                                                                Mar 8 at 21:44



















                                                              • can you elaborate?

                                                                – KirstieBallance
                                                                Mar 8 at 21:44

















                                                              can you elaborate?

                                                              – KirstieBallance
                                                              Mar 8 at 21:44





                                                              can you elaborate?

                                                              – KirstieBallance
                                                              Mar 8 at 21:44











                                                              4














                                                              You should update the web.config file in the server.
                                                              When nuget install NewtonSoft update this file including this code



                                                              <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>







                                                              share|improve this answer


























                                                              • In my case that was exactly my solution, put into app.config. "Assembly versions can be redirected in application, publisher policy, or machine configuration files."

                                                                – datps
                                                                Aug 2 '16 at 6:01
















                                                              4














                                                              You should update the web.config file in the server.
                                                              When nuget install NewtonSoft update this file including this code



                                                              <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>







                                                              share|improve this answer


























                                                              • In my case that was exactly my solution, put into app.config. "Assembly versions can be redirected in application, publisher policy, or machine configuration files."

                                                                – datps
                                                                Aug 2 '16 at 6:01














                                                              4












                                                              4








                                                              4







                                                              You should update the web.config file in the server.
                                                              When nuget install NewtonSoft update this file including this code



                                                              <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>







                                                              share|improve this answer















                                                              You should update the web.config file in the server.
                                                              When nuget install NewtonSoft update this file including this code



                                                              <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>








                                                              share|improve this answer














                                                              share|improve this answer



                                                              share|improve this answer








                                                              edited Nov 4 '15 at 4:10









                                                              Yvette Colomb

                                                              20.3k1470112




                                                              20.3k1470112










                                                              answered Jun 11 '14 at 20:48









                                                              oaamadosoaamados

                                                              596715




                                                              596715













                                                              • In my case that was exactly my solution, put into app.config. "Assembly versions can be redirected in application, publisher policy, or machine configuration files."

                                                                – datps
                                                                Aug 2 '16 at 6:01



















                                                              • In my case that was exactly my solution, put into app.config. "Assembly versions can be redirected in application, publisher policy, or machine configuration files."

                                                                – datps
                                                                Aug 2 '16 at 6:01

















                                                              In my case that was exactly my solution, put into app.config. "Assembly versions can be redirected in application, publisher policy, or machine configuration files."

                                                              – datps
                                                              Aug 2 '16 at 6:01





                                                              In my case that was exactly my solution, put into app.config. "Assembly versions can be redirected in application, publisher policy, or machine configuration files."

                                                              – datps
                                                              Aug 2 '16 at 6:01











                                                              3














                                                              I have got the same type of problem. And I also solved it just doing the following:
                                                              Go to TOOLS > NuGet Package Manager and Select Package Manager Console. Finally, execute the following two commands :)




                                                              1. uninstall-package newtonsoft.json -force

                                                              2. install-package newtonsoft.json






                                                              share|improve this answer




























                                                                3














                                                                I have got the same type of problem. And I also solved it just doing the following:
                                                                Go to TOOLS > NuGet Package Manager and Select Package Manager Console. Finally, execute the following two commands :)




                                                                1. uninstall-package newtonsoft.json -force

                                                                2. install-package newtonsoft.json






                                                                share|improve this answer


























                                                                  3












                                                                  3








                                                                  3







                                                                  I have got the same type of problem. And I also solved it just doing the following:
                                                                  Go to TOOLS > NuGet Package Manager and Select Package Manager Console. Finally, execute the following two commands :)




                                                                  1. uninstall-package newtonsoft.json -force

                                                                  2. install-package newtonsoft.json






                                                                  share|improve this answer













                                                                  I have got the same type of problem. And I also solved it just doing the following:
                                                                  Go to TOOLS > NuGet Package Manager and Select Package Manager Console. Finally, execute the following two commands :)




                                                                  1. uninstall-package newtonsoft.json -force

                                                                  2. install-package newtonsoft.json







                                                                  share|improve this answer












                                                                  share|improve this answer



                                                                  share|improve this answer










                                                                  answered Mar 4 '15 at 13:29









                                                                  Masud ShrabonMasud Shrabon

                                                                  570719




                                                                  570719























                                                                      3














                                                                      In my case, the main project was still referencing an old version of Newtonsoft.Json which didn't exists in the project any more (shown by a yellow exclamation mark). Removing the reference solved the problem, no bindingRedirect was necessary.






                                                                      share|improve this answer




























                                                                        3














                                                                        In my case, the main project was still referencing an old version of Newtonsoft.Json which didn't exists in the project any more (shown by a yellow exclamation mark). Removing the reference solved the problem, no bindingRedirect was necessary.






                                                                        share|improve this answer


























                                                                          3












                                                                          3








                                                                          3







                                                                          In my case, the main project was still referencing an old version of Newtonsoft.Json which didn't exists in the project any more (shown by a yellow exclamation mark). Removing the reference solved the problem, no bindingRedirect was necessary.






                                                                          share|improve this answer













                                                                          In my case, the main project was still referencing an old version of Newtonsoft.Json which didn't exists in the project any more (shown by a yellow exclamation mark). Removing the reference solved the problem, no bindingRedirect was necessary.







                                                                          share|improve this answer












                                                                          share|improve this answer



                                                                          share|improve this answer










                                                                          answered Jul 27 '15 at 7:49









                                                                          IngoBIngoB

                                                                          1,066918




                                                                          1,066918























                                                                              3














                                                                              I had the exact same problem with version 7.0.0.0, and the lib causing my problem was Microsoft.Rest.ClientRuntime which somehow was referring to the wrong version (6.0.0.0) of Newtonsoft.json, despite the right dependency management in nugget (the right version of newtonsoft.json (7.0.0.0) was installed).



                                                                              I solved this by applying the redirection above from 6.0.0.0 to 7.0.0.0 (from Kadir Can) in the config file:



                                                                              <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="7.0.0.0" />


                                                                              ----> After a few days without changing anything it came up again with the same error. I installed version 6.0.0.0 n updated it to 7.0.0.0 it works fine now.






                                                                              share|improve this answer


























                                                                              • Worked for me. Installed version Newtonsoft Json 7.0.1 (beta), but the config generated was pointing to 6.0.0.0 which was not correct. Thanks!

                                                                                – Dhanuka777
                                                                                Nov 5 '15 at 2:36
















                                                                              3














                                                                              I had the exact same problem with version 7.0.0.0, and the lib causing my problem was Microsoft.Rest.ClientRuntime which somehow was referring to the wrong version (6.0.0.0) of Newtonsoft.json, despite the right dependency management in nugget (the right version of newtonsoft.json (7.0.0.0) was installed).



                                                                              I solved this by applying the redirection above from 6.0.0.0 to 7.0.0.0 (from Kadir Can) in the config file:



                                                                              <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="7.0.0.0" />


                                                                              ----> After a few days without changing anything it came up again with the same error. I installed version 6.0.0.0 n updated it to 7.0.0.0 it works fine now.






                                                                              share|improve this answer


























                                                                              • Worked for me. Installed version Newtonsoft Json 7.0.1 (beta), but the config generated was pointing to 6.0.0.0 which was not correct. Thanks!

                                                                                – Dhanuka777
                                                                                Nov 5 '15 at 2:36














                                                                              3












                                                                              3








                                                                              3







                                                                              I had the exact same problem with version 7.0.0.0, and the lib causing my problem was Microsoft.Rest.ClientRuntime which somehow was referring to the wrong version (6.0.0.0) of Newtonsoft.json, despite the right dependency management in nugget (the right version of newtonsoft.json (7.0.0.0) was installed).



                                                                              I solved this by applying the redirection above from 6.0.0.0 to 7.0.0.0 (from Kadir Can) in the config file:



                                                                              <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="7.0.0.0" />


                                                                              ----> After a few days without changing anything it came up again with the same error. I installed version 6.0.0.0 n updated it to 7.0.0.0 it works fine now.






                                                                              share|improve this answer















                                                                              I had the exact same problem with version 7.0.0.0, and the lib causing my problem was Microsoft.Rest.ClientRuntime which somehow was referring to the wrong version (6.0.0.0) of Newtonsoft.json, despite the right dependency management in nugget (the right version of newtonsoft.json (7.0.0.0) was installed).



                                                                              I solved this by applying the redirection above from 6.0.0.0 to 7.0.0.0 (from Kadir Can) in the config file:



                                                                              <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="7.0.0.0" />


                                                                              ----> After a few days without changing anything it came up again with the same error. I installed version 6.0.0.0 n updated it to 7.0.0.0 it works fine now.







                                                                              share|improve this answer














                                                                              share|improve this answer



                                                                              share|improve this answer








                                                                              edited Oct 26 '15 at 15:01

























                                                                              answered Oct 12 '15 at 9:50









                                                                              Lokman ErsoyLokman Ersoy

                                                                              1318




                                                                              1318













                                                                              • Worked for me. Installed version Newtonsoft Json 7.0.1 (beta), but the config generated was pointing to 6.0.0.0 which was not correct. Thanks!

                                                                                – Dhanuka777
                                                                                Nov 5 '15 at 2:36



















                                                                              • Worked for me. Installed version Newtonsoft Json 7.0.1 (beta), but the config generated was pointing to 6.0.0.0 which was not correct. Thanks!

                                                                                – Dhanuka777
                                                                                Nov 5 '15 at 2:36

















                                                                              Worked for me. Installed version Newtonsoft Json 7.0.1 (beta), but the config generated was pointing to 6.0.0.0 which was not correct. Thanks!

                                                                              – Dhanuka777
                                                                              Nov 5 '15 at 2:36





                                                                              Worked for me. Installed version Newtonsoft Json 7.0.1 (beta), but the config generated was pointing to 6.0.0.0 which was not correct. Thanks!

                                                                              – Dhanuka777
                                                                              Nov 5 '15 at 2:36











                                                                              3














                                                                              Just check the version of Newtonsoft.Json Newtonsoft properties



                                                                              Then you need to add that version in your web config (in my case 8.0.0.0)
                                                                              Web config






                                                                              share|improve this answer




























                                                                                3














                                                                                Just check the version of Newtonsoft.Json Newtonsoft properties



                                                                                Then you need to add that version in your web config (in my case 8.0.0.0)
                                                                                Web config






                                                                                share|improve this answer


























                                                                                  3












                                                                                  3








                                                                                  3







                                                                                  Just check the version of Newtonsoft.Json Newtonsoft properties



                                                                                  Then you need to add that version in your web config (in my case 8.0.0.0)
                                                                                  Web config






                                                                                  share|improve this answer













                                                                                  Just check the version of Newtonsoft.Json Newtonsoft properties



                                                                                  Then you need to add that version in your web config (in my case 8.0.0.0)
                                                                                  Web config







                                                                                  share|improve this answer












                                                                                  share|improve this answer



                                                                                  share|improve this answer










                                                                                  answered Mar 1 '16 at 17:01









                                                                                  Gerald Stanley Padgett EspinozGerald Stanley Padgett Espinoz

                                                                                  365




                                                                                  365























                                                                                      2














                                                                                      In my case, after downloading the assembly and adding the reference to the project, I solved this by 'unblocking' the DLL before adding the reference to the project.



                                                                                      Using Windows explorer, browse to the DLL location, right-click on the DLL and then select 'properties'. You'll find an 'unblock' button on one of the tabs and then you can add the reference and the assembly will load correctly.






                                                                                      share|improve this answer




























                                                                                        2














                                                                                        In my case, after downloading the assembly and adding the reference to the project, I solved this by 'unblocking' the DLL before adding the reference to the project.



                                                                                        Using Windows explorer, browse to the DLL location, right-click on the DLL and then select 'properties'. You'll find an 'unblock' button on one of the tabs and then you can add the reference and the assembly will load correctly.






                                                                                        share|improve this answer


























                                                                                          2












                                                                                          2








                                                                                          2







                                                                                          In my case, after downloading the assembly and adding the reference to the project, I solved this by 'unblocking' the DLL before adding the reference to the project.



                                                                                          Using Windows explorer, browse to the DLL location, right-click on the DLL and then select 'properties'. You'll find an 'unblock' button on one of the tabs and then you can add the reference and the assembly will load correctly.






                                                                                          share|improve this answer













                                                                                          In my case, after downloading the assembly and adding the reference to the project, I solved this by 'unblocking' the DLL before adding the reference to the project.



                                                                                          Using Windows explorer, browse to the DLL location, right-click on the DLL and then select 'properties'. You'll find an 'unblock' button on one of the tabs and then you can add the reference and the assembly will load correctly.







                                                                                          share|improve this answer












                                                                                          share|improve this answer



                                                                                          share|improve this answer










                                                                                          answered Apr 10 '14 at 14:17









                                                                                          VorTechSVorTechS

                                                                                          176210




                                                                                          176210























                                                                                              2














                                                                                              I made the mistake of adding a NewtonSoft .dll file for .Net 4.5.



                                                                                              My main project was 4.5, but when I added an extra project to my solution, it strangely added it as a .Net 2.0 project... and when I attempted to use NewtonSoft's 4.5 dll with this, I got this "Newtonsoft.Json couldn't be found" error.



                                                                                              The solution (of course) was to change this new project from .Net 2.0 to 4.5.






                                                                                              share|improve this answer




























                                                                                                2














                                                                                                I made the mistake of adding a NewtonSoft .dll file for .Net 4.5.



                                                                                                My main project was 4.5, but when I added an extra project to my solution, it strangely added it as a .Net 2.0 project... and when I attempted to use NewtonSoft's 4.5 dll with this, I got this "Newtonsoft.Json couldn't be found" error.



                                                                                                The solution (of course) was to change this new project from .Net 2.0 to 4.5.






                                                                                                share|improve this answer


























                                                                                                  2












                                                                                                  2








                                                                                                  2







                                                                                                  I made the mistake of adding a NewtonSoft .dll file for .Net 4.5.



                                                                                                  My main project was 4.5, but when I added an extra project to my solution, it strangely added it as a .Net 2.0 project... and when I attempted to use NewtonSoft's 4.5 dll with this, I got this "Newtonsoft.Json couldn't be found" error.



                                                                                                  The solution (of course) was to change this new project from .Net 2.0 to 4.5.






                                                                                                  share|improve this answer













                                                                                                  I made the mistake of adding a NewtonSoft .dll file for .Net 4.5.



                                                                                                  My main project was 4.5, but when I added an extra project to my solution, it strangely added it as a .Net 2.0 project... and when I attempted to use NewtonSoft's 4.5 dll with this, I got this "Newtonsoft.Json couldn't be found" error.



                                                                                                  The solution (of course) was to change this new project from .Net 2.0 to 4.5.







                                                                                                  share|improve this answer












                                                                                                  share|improve this answer



                                                                                                  share|improve this answer










                                                                                                  answered Jul 29 '14 at 14:53









                                                                                                  Mike GledhillMike Gledhill

                                                                                                  17.3k498119




                                                                                                  17.3k498119























                                                                                                      2














                                                                                                      Nothing from above helped me, but what actually fixed it is the following:





                                                                                                      1. Remove all dependency bindings in app.config (from all app.config files in the solution)

                                                                                                      2. Execute the following command from "Package Manager Console"


                                                                                                      Get-Project -All | Add-BindingRedirect




                                                                                                      1. Rebuild


                                                                                                      Reference:
                                                                                                      http://blog.myget.org/post/2014/11/27/Could-not-load-file-or-assembly-NuGet-Assembly-Redirects.aspx






                                                                                                      share|improve this answer






























                                                                                                        2














                                                                                                        Nothing from above helped me, but what actually fixed it is the following:





                                                                                                        1. Remove all dependency bindings in app.config (from all app.config files in the solution)

                                                                                                        2. Execute the following command from "Package Manager Console"


                                                                                                        Get-Project -All | Add-BindingRedirect




                                                                                                        1. Rebuild


                                                                                                        Reference:
                                                                                                        http://blog.myget.org/post/2014/11/27/Could-not-load-file-or-assembly-NuGet-Assembly-Redirects.aspx






                                                                                                        share|improve this answer




























                                                                                                          2












                                                                                                          2








                                                                                                          2







                                                                                                          Nothing from above helped me, but what actually fixed it is the following:





                                                                                                          1. Remove all dependency bindings in app.config (from all app.config files in the solution)

                                                                                                          2. Execute the following command from "Package Manager Console"


                                                                                                          Get-Project -All | Add-BindingRedirect




                                                                                                          1. Rebuild


                                                                                                          Reference:
                                                                                                          http://blog.myget.org/post/2014/11/27/Could-not-load-file-or-assembly-NuGet-Assembly-Redirects.aspx






                                                                                                          share|improve this answer















                                                                                                          Nothing from above helped me, but what actually fixed it is the following:





                                                                                                          1. Remove all dependency bindings in app.config (from all app.config files in the solution)

                                                                                                          2. Execute the following command from "Package Manager Console"


                                                                                                          Get-Project -All | Add-BindingRedirect




                                                                                                          1. Rebuild


                                                                                                          Reference:
                                                                                                          http://blog.myget.org/post/2014/11/27/Could-not-load-file-or-assembly-NuGet-Assembly-Redirects.aspx







                                                                                                          share|improve this answer














                                                                                                          share|improve this answer



                                                                                                          share|improve this answer








                                                                                                          edited Jan 27 '15 at 13:45

























                                                                                                          answered Jan 27 '15 at 12:27









                                                                                                          valentinvsvalentinvs

                                                                                                          18114




                                                                                                          18114























                                                                                                              2














                                                                                                              Right click your project select manage Nuget packages, type newtonsoft in the search box and install the latest version. Then Run your App






                                                                                                              share|improve this answer




























                                                                                                                2














                                                                                                                Right click your project select manage Nuget packages, type newtonsoft in the search box and install the latest version. Then Run your App






                                                                                                                share|improve this answer


























                                                                                                                  2












                                                                                                                  2








                                                                                                                  2







                                                                                                                  Right click your project select manage Nuget packages, type newtonsoft in the search box and install the latest version. Then Run your App






                                                                                                                  share|improve this answer













                                                                                                                  Right click your project select manage Nuget packages, type newtonsoft in the search box and install the latest version. Then Run your App







                                                                                                                  share|improve this answer












                                                                                                                  share|improve this answer



                                                                                                                  share|improve this answer










                                                                                                                  answered May 7 '15 at 14:56









                                                                                                                  uche Godfreyuche Godfrey

                                                                                                                  4816




                                                                                                                  4816























                                                                                                                      2














                                                                                                                      I was facing the same error and struggled with it for hours. I had a web API project which is using Newtonsoft.json and another UnitTest project for the web API project. The unit test project also needed the Newtonsoft.json reference. But on adding the link I was getting the above exception.



                                                                                                                      I finally resolved it by adding the below code snippet in the app.config of the unit test project:



                                                                                                                      <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>





                                                                                                                      share|improve this answer


























                                                                                                                      • <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>

                                                                                                                        – mukulsharma1146
                                                                                                                        May 18 '15 at 13:06











                                                                                                                      • I was having this same problem when I upgraded Nestwonsoft.Json while still using and old version of WebAPI, and this solved it. Thanks!

                                                                                                                        – Gavin.Paolucci.Kleinow
                                                                                                                        Jun 17 '15 at 14:50
















                                                                                                                      2














                                                                                                                      I was facing the same error and struggled with it for hours. I had a web API project which is using Newtonsoft.json and another UnitTest project for the web API project. The unit test project also needed the Newtonsoft.json reference. But on adding the link I was getting the above exception.



                                                                                                                      I finally resolved it by adding the below code snippet in the app.config of the unit test project:



                                                                                                                      <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>





                                                                                                                      share|improve this answer


























                                                                                                                      • <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>

                                                                                                                        – mukulsharma1146
                                                                                                                        May 18 '15 at 13:06











                                                                                                                      • I was having this same problem when I upgraded Nestwonsoft.Json while still using and old version of WebAPI, and this solved it. Thanks!

                                                                                                                        – Gavin.Paolucci.Kleinow
                                                                                                                        Jun 17 '15 at 14:50














                                                                                                                      2












                                                                                                                      2








                                                                                                                      2







                                                                                                                      I was facing the same error and struggled with it for hours. I had a web API project which is using Newtonsoft.json and another UnitTest project for the web API project. The unit test project also needed the Newtonsoft.json reference. But on adding the link I was getting the above exception.



                                                                                                                      I finally resolved it by adding the below code snippet in the app.config of the unit test project:



                                                                                                                      <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>





                                                                                                                      share|improve this answer















                                                                                                                      I was facing the same error and struggled with it for hours. I had a web API project which is using Newtonsoft.json and another UnitTest project for the web API project. The unit test project also needed the Newtonsoft.json reference. But on adding the link I was getting the above exception.



                                                                                                                      I finally resolved it by adding the below code snippet in the app.config of the unit test project:



                                                                                                                      <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>






                                                                                                                      share|improve this answer














                                                                                                                      share|improve this answer



                                                                                                                      share|improve this answer








                                                                                                                      edited May 18 '15 at 16:57









                                                                                                                      Brian

                                                                                                                      6,43773043




                                                                                                                      6,43773043










                                                                                                                      answered May 18 '15 at 13:06









                                                                                                                      mukulsharma1146mukulsharma1146

                                                                                                                      10110




                                                                                                                      10110













                                                                                                                      • <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>

                                                                                                                        – mukulsharma1146
                                                                                                                        May 18 '15 at 13:06











                                                                                                                      • I was having this same problem when I upgraded Nestwonsoft.Json while still using and old version of WebAPI, and this solved it. Thanks!

                                                                                                                        – Gavin.Paolucci.Kleinow
                                                                                                                        Jun 17 '15 at 14:50



















                                                                                                                      • <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>

                                                                                                                        – mukulsharma1146
                                                                                                                        May 18 '15 at 13:06











                                                                                                                      • I was having this same problem when I upgraded Nestwonsoft.Json while still using and old version of WebAPI, and this solved it. Thanks!

                                                                                                                        – Gavin.Paolucci.Kleinow
                                                                                                                        Jun 17 '15 at 14:50

















                                                                                                                      <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>

                                                                                                                      – mukulsharma1146
                                                                                                                      May 18 '15 at 13:06





                                                                                                                      <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>

                                                                                                                      – mukulsharma1146
                                                                                                                      May 18 '15 at 13:06













                                                                                                                      I was having this same problem when I upgraded Nestwonsoft.Json while still using and old version of WebAPI, and this solved it. Thanks!

                                                                                                                      – Gavin.Paolucci.Kleinow
                                                                                                                      Jun 17 '15 at 14:50





                                                                                                                      I was having this same problem when I upgraded Nestwonsoft.Json while still using and old version of WebAPI, and this solved it. Thanks!

                                                                                                                      – Gavin.Paolucci.Kleinow
                                                                                                                      Jun 17 '15 at 14:50











                                                                                                                      2














                                                                                                                      Another insidious problem is that it appears that binding redirects can just silently fail if the element has an incorrect configuration on any other dependentAssembly elements.



                                                                                                                      Ensure that you only have one element under each element.



                                                                                                                      In some instances, VS generates this:



                                                                                                                        <dependentAssembly>
                                                                                                                      <assemblyIdentity ...
                                                                                                                      <assemblyIdentity ...
                                                                                                                      </dependentAssembly>


                                                                                                                      Instead of



                                                                                                                        <dependentAssembly>
                                                                                                                      <assemblyIdentity ...
                                                                                                                      </dependentAssembly>
                                                                                                                      <dependentAssembly>
                                                                                                                      <assemblyIdentity ...
                                                                                                                      </dependentAssembly>


                                                                                                                      Took me a long time to realise this was the problem!






                                                                                                                      share|improve this answer




























                                                                                                                        2














                                                                                                                        Another insidious problem is that it appears that binding redirects can just silently fail if the element has an incorrect configuration on any other dependentAssembly elements.



                                                                                                                        Ensure that you only have one element under each element.



                                                                                                                        In some instances, VS generates this:



                                                                                                                          <dependentAssembly>
                                                                                                                        <assemblyIdentity ...
                                                                                                                        <assemblyIdentity ...
                                                                                                                        </dependentAssembly>


                                                                                                                        Instead of



                                                                                                                          <dependentAssembly>
                                                                                                                        <assemblyIdentity ...
                                                                                                                        </dependentAssembly>
                                                                                                                        <dependentAssembly>
                                                                                                                        <assemblyIdentity ...
                                                                                                                        </dependentAssembly>


                                                                                                                        Took me a long time to realise this was the problem!






                                                                                                                        share|improve this answer


























                                                                                                                          2












                                                                                                                          2








                                                                                                                          2







                                                                                                                          Another insidious problem is that it appears that binding redirects can just silently fail if the element has an incorrect configuration on any other dependentAssembly elements.



                                                                                                                          Ensure that you only have one element under each element.



                                                                                                                          In some instances, VS generates this:



                                                                                                                            <dependentAssembly>
                                                                                                                          <assemblyIdentity ...
                                                                                                                          <assemblyIdentity ...
                                                                                                                          </dependentAssembly>


                                                                                                                          Instead of



                                                                                                                            <dependentAssembly>
                                                                                                                          <assemblyIdentity ...
                                                                                                                          </dependentAssembly>
                                                                                                                          <dependentAssembly>
                                                                                                                          <assemblyIdentity ...
                                                                                                                          </dependentAssembly>


                                                                                                                          Took me a long time to realise this was the problem!






                                                                                                                          share|improve this answer













                                                                                                                          Another insidious problem is that it appears that binding redirects can just silently fail if the element has an incorrect configuration on any other dependentAssembly elements.



                                                                                                                          Ensure that you only have one element under each element.



                                                                                                                          In some instances, VS generates this:



                                                                                                                            <dependentAssembly>
                                                                                                                          <assemblyIdentity ...
                                                                                                                          <assemblyIdentity ...
                                                                                                                          </dependentAssembly>


                                                                                                                          Instead of



                                                                                                                            <dependentAssembly>
                                                                                                                          <assemblyIdentity ...
                                                                                                                          </dependentAssembly>
                                                                                                                          <dependentAssembly>
                                                                                                                          <assemblyIdentity ...
                                                                                                                          </dependentAssembly>


                                                                                                                          Took me a long time to realise this was the problem!







                                                                                                                          share|improve this answer












                                                                                                                          share|improve this answer



                                                                                                                          share|improve this answer










                                                                                                                          answered Aug 18 '15 at 14:08









                                                                                                                          DanielDaniel

                                                                                                                          49625




                                                                                                                          49625























                                                                                                                              2














                                                                                                                              Below section add in to your web.config



                                                                                                                              <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>





                                                                                                                              share|improve this answer




























                                                                                                                                2














                                                                                                                                Below section add in to your web.config



                                                                                                                                <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>





                                                                                                                                share|improve this answer


























                                                                                                                                  2












                                                                                                                                  2








                                                                                                                                  2







                                                                                                                                  Below section add in to your web.config



                                                                                                                                  <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>





                                                                                                                                  share|improve this answer













                                                                                                                                  Below section add in to your web.config



                                                                                                                                  <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>






                                                                                                                                  share|improve this answer












                                                                                                                                  share|improve this answer



                                                                                                                                  share|improve this answer










                                                                                                                                  answered Sep 4 '15 at 5:42









                                                                                                                                  Jaydeep ShilJaydeep Shil

                                                                                                                                  869914




                                                                                                                                  869914























                                                                                                                                      2














                                                                                                                                      If error disappears locally and still appears on server, the solution that works with me is to delete bin folder and packages.config and web.config and reupload these files






                                                                                                                                      share|improve this answer




























                                                                                                                                        2














                                                                                                                                        If error disappears locally and still appears on server, the solution that works with me is to delete bin folder and packages.config and web.config and reupload these files






                                                                                                                                        share|improve this answer


























                                                                                                                                          2












                                                                                                                                          2








                                                                                                                                          2







                                                                                                                                          If error disappears locally and still appears on server, the solution that works with me is to delete bin folder and packages.config and web.config and reupload these files






                                                                                                                                          share|improve this answer













                                                                                                                                          If error disappears locally and still appears on server, the solution that works with me is to delete bin folder and packages.config and web.config and reupload these files







                                                                                                                                          share|improve this answer












                                                                                                                                          share|improve this answer



                                                                                                                                          share|improve this answer










                                                                                                                                          answered Sep 9 '15 at 6:26









                                                                                                                                          Ahmad AlaaAhmad Alaa

                                                                                                                                          405417




                                                                                                                                          405417






















                                                                                                                                              1 2
                                                                                                                                              next




                                                                                                                                              protected by Pankaj Parkar Nov 21 '16 at 20:46



                                                                                                                                              Thank you for your interest in this question.
                                                                                                                                              Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).



                                                                                                                                              Would you like to answer one of these unanswered questions instead?



                                                                                                                                              Popular posts from this blog

                                                                                                                                              How to change which sound is reproduced for terminal bell?

                                                                                                                                              Can I use Tabulator js library in my java Spring + Thymeleaf project?

                                                                                                                                              Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents