title: Could not load file or assembly 'Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies
body: <p>This one error is driving me nuts. </p>
  
  <p>I installed the <strong>SendGrid</strong> NuGet package in one of my class libraries named <strong>BaseServices</strong>, which has a dependency on <strong>Newtonsoft.Json v7.0.1</strong>, so it installs that in my packages folder and references that.</p>
  
  <p>In the class library, I have this binding redirect:</p>
  
  <pre><code>&lt;dependentAssembly&gt;
      &lt;assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" /&gt;
      &lt;bindingRedirect oldVersion="0.0.0.0-7.0.0.0" newVersion="7.0.0.0" /&gt;
  &lt;/dependentAssembly&gt;
  </code></pre>
  
  <p>In the web.config of the ASP.NET MVC application, i.e. the client application that uses my class library, I have an assembly binding redirect for versions less than v6 to point to v6 of the <strong>Newtonsoft.Json</strong> library like so:</p>
  
  <pre><code>&lt;dependentAssembly&gt;
   &lt;assemblyIdentity name="Newtonsoft.Json" culture="neutral"
                publicKeyToken="30ad4fe6b2a6aeed" /&gt;
    &lt;bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" /&gt;
  &lt;/dependentAssembly&gt;
  </code></pre>
  
  <p>When I run my email sending code that is in the <strong>BaseServices</strong> library, I get this error:</p>
  
  <blockquote>
    <p>The thread 0x1a4c has exited with code 0 (0x0).
    System.IO.FileLoadException: Could not load file or assembly
    'Newtonsoft.Json, Version=7.0.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) File name:
    'Newtonsoft.Json, Version=7.0.0.0, Culture=neutral,
    PublicKeyToken=30ad4fe6b2a6aeed'    at
    SendGrid.Helpers.Mail.Mail.Get()    at
    BaseServices.EmailService.SendAsync(EmailMessage message) in
    MyFolder\BaseServices\EmailService.cs:line 39</p>
    
    <p>=== Pre-bind state information === LOG: DisplayName = Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed 
    (Fully-specified) LOG: Appbase = file:///MyFolder/Web/ LOG: Initial
    PrivatePath = MyFolder\Web\bin Calling assembly : SendGrid,
    Version=7.0.3.0, Culture=neutral, PublicKeyToken=4f047e93159395ca.
    === LOG: This bind starts in default load context. LOG: Using application configuration file: MyFolder\Web\web.config LOG: Using
    host configuration file:
    C:\Users\computer\Documents\IISExpress\config\aspnet.config LOG: Using
    machine configuration file from
    C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
    LOG: Post-policy reference: Newtonsoft.Json, Version=7.0.0.0,
    Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed LOG: Attempting
    download of new URL
    file:///C:/Users/computer/AppData/Local/Temp/Temporary ASP.NET
    Files/root/ef9cacdf/e639667a/Newtonsoft.Json.DLL. LOG: Attempting
    download of new URL
    file:///C:/Users/computer/AppData/Local/Temp/Temporary ASP.NET
    Files/root/ef9cacdf/e639667a/Newtonsoft.Json/Newtonsoft.Json.DLL. LOG:
    Attempting download of new URL
    file:///MyFolder/Web/bin/Newtonsoft.Json.DLL. WRN: Comparing the
    assembly name resulted in the mismatch: Major Version ERR: Failed to
    complete setup of assembly (hr = 0x80131040). Probing terminated.</p>
  </blockquote>