2

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)

There is already NewtonSoft.Json.dll with version 6.0.0.0 present in the bin folder.

Since NewtonSoft.Json.dll is also referenced by System.Web.Http and version of that is 4.5.0.0

And there is also the following code in web.config

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

Followed this solution but didn't help Newtonsoft.Json Assembly Conflict

Community
  • 1
  • 1
StackOverflowVeryHelpful
  • 2,347
  • 8
  • 34
  • 46
  • When do you see the error? (I.e. you have solution with unit test that don't include config)? – Alexei Levenkov Oct 29 '14 at 02:12
  • 1
    Also, does this error happen at compile time or at runtime? – danludwig Oct 29 '14 at 02:22
  • I published this as a website to IIS and then i see the following error when launching the browser. So technically happens at runtime – StackOverflowVeryHelpful Oct 29 '14 at 02:28
  • Based on information you provided it should work fine. I guess you have to go deeper and enable fusion logging to find out what exactly happens and what configuration is actually used... See [Debugging assembly loading](http://blogs.msdn.com/b/suzcook/archive/2003/05/29/57120.aspx) or any similar article to continue investigation. Good luck. – Alexei Levenkov Oct 29 '14 at 02:44
  • 1
    did you look at this http://stackoverflow.com/questions/22685530/could-not-load-file-or-assembly-newtonsoft-json-or-one-of-its-dependencies-ma might be a DLL hell problem – Chaturvedi Dewashish Oct 29 '14 at 20:27

0 Answers0