title: Could not load file or assembly 'WebMatrix.Data`
body: <p>I updated MVC4 to MVC5. When you run the application I got an error that I don't have <code>WebMatrix.Data</code>. I installed it <code>PM&gt; Install-Package WebMatrix.Data</code>. Now when you start getting in the browser:</p>
  
  <blockquote>
    <p>Could not load file or assembly 'WebMatrix.Data, Version = 3.0.0.0,
    Culture = neutral, PublicKeyToken = 31bf3856ad364e35' or one of its
    dependencies. Located assembly's manifest definition does not match
    the assembly reference. (Exception from HRESULT: 0x80131040)</p>
  </blockquote>
  
  <p>Anyone know how to fix this?</p>
  
  <p><strong>Package Manager Console Log</strong></p>
  
  <pre><code>Attempting to resolve dependency 'Microsoft.AspNet.WebPages.Data (≥ 2.0.20710.0)'.
  Installing 'WebMatrix.Data 2.0.30506.0'.
  You are downloading WebMatrix.Data from Microsoft, the license agreement to which is available at http://www.microsoft.com/web/webpi/eula/aspnetcomponent_rtw_enu.htm. Check the package for additional dependencies, which may come with their own license agreement(s). Your use of the package and dependencies constitutes your acceptance of their license agreements. If you do not accept the license agreement(s), then delete the relevant components from your device.
  Successfully installed 'WebMatrix.Data 2.0.30506.0'.
  Adding 'WebMatrix.Data 2.0.30506.0' to xxx.
  Successfully added 'WebMatrix.Data 2.0.30506.0' to xxx.`
  </code></pre>
  
  <p>Piece of code <strong>Web.config</strong></p>
  
  <pre><code>&lt;runtime&gt;
      &lt;assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"&gt;
        &lt;dependentAssembly&gt;
          &lt;assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" /&gt;
          &lt;bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" /&gt;
        &lt;/dependentAssembly&gt;
        &lt;dependentAssembly&gt;
          &lt;assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" /&gt;
          &lt;bindingRedirect oldVersion="0.0.0.0-1.3.0.0" newVersion="1.3.0.0" /&gt;
        &lt;/dependentAssembly&gt;
        &lt;dependentAssembly&gt;
          &lt;assemblyIdentity name="EntityFramework" publicKeyToken="b77a5c561934e089" culture="neutral" /&gt;
          &lt;bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" /&gt;
        &lt;/dependentAssembly&gt;
        &lt;dependentAssembly&gt;
          &lt;assemblyIdentity name="DotNetOpenAuth.AspNet" publicKeyToken="2780ccd10d57b246" culture="neutral" /&gt;
          &lt;bindingRedirect oldVersion="0.0.0.0-4.3.0.0" newVersion="4.3.0.0" /&gt;
        &lt;/dependentAssembly&gt;
        &lt;dependentAssembly&gt;
          &lt;assemblyIdentity name="DotNetOpenAuth.Core" publicKeyToken="2780ccd10d57b246" culture="neutral" /&gt;
          &lt;bindingRedirect oldVersion="0.0.0.0-4.3.0.0" newVersion="4.3.0.0" /&gt;
        &lt;/dependentAssembly&gt;
        &lt;dependentAssembly&gt;
          &lt;assemblyIdentity name="Microsoft.AspNet.Identity.Core" publicKeyToken="31bf3856ad364e35" culture="neutral" /&gt;
          &lt;bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0" /&gt;
        &lt;/dependentAssembly&gt;
        &lt;dependentAssembly&gt;
          &lt;assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" /&gt;
          &lt;bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" /&gt;
        &lt;/dependentAssembly&gt;
        &lt;dependentAssembly&gt;
          &lt;assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" /&gt;
          &lt;bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0" /&gt;
        &lt;/dependentAssembly&gt;
        &lt;dependentAssembly&gt;
          &lt;assemblyIdentity name="System.Web.Razor" publicKeyToken="31bf3856ad364e35" culture="neutral" /&gt;
          &lt;bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0" /&gt;
        &lt;/dependentAssembly&gt;
        &lt;dependentAssembly&gt;
          &lt;assemblyIdentity name="System.Web.WebPages.Razor" publicKeyToken="31bf3856ad364e35" culture="neutral" /&gt;
          &lt;bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0" /&gt;
        &lt;/dependentAssembly&gt;
        &lt;dependentAssembly&gt;
          &lt;assemblyIdentity name="WebMatrix.WebData" publicKeyToken="31bf3856ad364e35" culture="neutral" /&gt;
          &lt;bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0" /&gt;
        &lt;/dependentAssembly&gt;
        &lt;dependentAssembly&gt;
          &lt;assemblyIdentity name="WebMatrix.Data" publicKeyToken="31bf3856ad364e35" culture="neutral" /&gt;
          &lt;bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0" /&gt;
        &lt;/dependentAssembly&gt;
      &lt;/assemblyBinding&gt;
    &lt;/runtime&gt;
  </code></pre>