title: Could not load file or assembly System.Web.Mvc or one of its dependencies
body: <p>currently working on asp.net mvc5 (old mvc3 project). 
  It builds just fine, but when I start the project but when I run the project I am facing the following error.</p>
  
  <pre><code>Could not load file or assembly 'System.Web.Mvc' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
  </code></pre>
  
  <p>Not sure how I can can fix this, any ideas? </p>
  
  <p><strong>This is the Assembly Load Trace:</strong></p>
  
  <pre><code>=== Pre-bind state information ===
  LOG: DisplayName = System.Web.Mvc
   (Partial)
  WRN: Partial binding information was supplied for an assembly:
  WRN: Assembly Name: System.Web.Mvc | Domain ID: 2
  WRN: A partial bind occurs when only part of the assembly display name is provided.
  WRN: This might result in the binder loading an incorrect assembly.
  WRN: It is recommended to provide a fully specified textual identity for the assembly,
  WRN: that consists of the simple name, version, culture, and public key token.
  WRN: See whitepaper http://go.microsoft.com/fwlink/?LinkId=109270 for more information and common solutions to this issue.
  LOG: Appbase = file:///C:/Users/joaki/Source/Repos/2015-TimeAdministration/Source/V2/SalesWeb2/TimeReportV2/
  LOG: Initial PrivatePath = C:\Users\joaki\Source\Repos\2015-TimeAdministration\Source\V2\SalesWeb2\TimeReportV2\bin
  Calling assembly : (Unknown).
  ===
  LOG: This bind starts in default load context.
  LOG: Using application configuration file: C:\Users\joaki\Source\Repos\2015-TimeAdministration\Source\V2\SalesWeb2\TimeReportV2\web.config
  LOG: Using host configuration file: C:\Users\joaki\Documents\IISExpress\config\aspnet.config
  LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
  LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
  LOG: Attempting download of new URL file:///C:/Users/joaki/AppData/Local/Temp/Temporary ASP.NET Files/root/a90c5137/552c494a/System.Web.Mvc.DLL.
  LOG: Attempting download of new URL file:///C:/Users/joaki/AppData/Local/Temp/Temporary ASP.NET Files/root/a90c5137/552c494a/System.Web.Mvc/System.Web.Mvc.DLL.
  LOG: Attempting download of new URL file:///C:/Users/joaki/Source/Repos/2015-TimeAdministration/Source/V2/SalesWeb2/TimeReportV2/bin/System.Web.Mvc.DLL.
  LOG: Using application configuration file: C:\Users\joaki\Source\Repos\2015-TimeAdministration\Source\V2\SalesWeb2\TimeReportV2\web.config
  LOG: Using host configuration file: C:\Users\joaki\Documents\IISExpress\config\aspnet.config
  LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
  LOG: Redirect found in application configuration file: 4.0.0.1 redirected to 5.2.3.0.
  LOG: Post-policy reference: System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
  LOG: Attempting download of new URL file:///C:/Users/joaki/AppData/Local/Temp/Temporary ASP.NET Files/root/a90c5137/552c494a/System.Web.Mvc.DLL.
  LOG: Attempting download of new URL file:///C:/Users/joaki/AppData/Local/Temp/Temporary ASP.NET Files/root/a90c5137/552c494a/System.Web.Mvc/System.Web.Mvc.DLL.
  LOG: Attempting download of new URL file:///C:/Users/joaki/Source/Repos/2015-TimeAdministration/Source/V2/SalesWeb2/TimeReportV2/bin/System.Web.Mvc.DLL.
  WRN: Comparing the assembly name resulted in the mismatch: Major Version
  ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.
  </code></pre>
  
  <p><strong>Web config:</strong></p>
  
  <pre><code>    &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;!--
    For more information on how to configure your ASP.NET application, please visit
    http://go.microsoft.com/fwlink/?LinkId=301880
    --&gt;
  &lt;configuration&gt;
      &lt;connectionStrings&gt;
      &lt;add name="SaleswebEntities" connectionString= ""/&gt;
    &lt;/connectionStrings&gt;
  
  &lt;appSettings&gt;
      &lt;add key="webpages:Version" value="3.0.0.0" /&gt;
      &lt;add key="webpages:Enabled" value="false" /&gt;
      &lt;add key="ClientValidationEnabled" value="true" /&gt;
      &lt;add key="UnobtrusiveJavaScriptEnabled" value="true" /&gt;
    &lt;/appSettings&gt;
  
    &lt;system.web&gt;
      &lt;compilation debug="true" targetFramework="4.5.1" &gt;
        &lt;assemblies&gt;
          &lt;add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/&gt;
        &lt;/assemblies&gt;
      &lt;/compilation&gt;
  
    &lt;authentication mode="Forms"&gt;
      &lt;forms loginUrl="~/Account/LogOn" timeout="2880" /&gt;
    &lt;/authentication&gt;
  
    &lt;membership&gt;
      &lt;providers&gt;
        &lt;clear /&gt;
        &lt;add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServices" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/" /&gt;
      &lt;/providers&gt;
    &lt;/membership&gt;
  
    &lt;profile&gt;
      &lt;providers&gt;
        &lt;clear /&gt;
        &lt;add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="ApplicationServices" applicationName="/" /&gt;
      &lt;/providers&gt;
    &lt;/profile&gt;
  
    &lt;roleManager enabled="false"&gt;
      &lt;providers&gt;
        &lt;clear /&gt;
        &lt;add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="ApplicationServices" applicationName="/" /&gt;
        &lt;add name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider" applicationName="/" /&gt;
      &lt;/providers&gt;
    &lt;/roleManager&gt;
  
    &lt;pages&gt;
      &lt;namespaces&gt;
        &lt;add namespace="System.Web.Mvc" /&gt;
        &lt;add namespace="System.Web.Mvc.Ajax" /&gt;
        &lt;add namespace="System.Web.Mvc.Html" /&gt;
        &lt;add namespace="System.Web.Routing" /&gt;
        &lt;add namespace="System.Web.Helpers" /&gt;
        &lt;add namespace="System.Web.WebPages" /&gt;
      &lt;/namespaces&gt;
    &lt;/pages&gt;
    &lt;/system.web&gt;
  
    &lt;system.webServer&gt;
      &lt;validation validateIntegratedModeConfiguration="false" /&gt;
      &lt;modules runAllManagedModulesForAllRequests="true" /&gt;
    &lt;/system.webServer&gt;
  
    &lt;runtime&gt;
      &lt;assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"&gt;
        &lt;dependentAssembly&gt;
          &lt;assemblyIdentity name="Newtonsoft.Json" culture="neutral" publicKeyToken="30ad4fe6b2a6aeed" /&gt;
          &lt;bindingRedirect oldVersion="0.0.0.0-7.0.0.0" newVersion="7.0.0.0" /&gt;
        &lt;/dependentAssembly&gt;
        &lt;dependentAssembly&gt;
          &lt;assemblyIdentity name="System.Web.Optimization" publicKeyToken="31bf3856ad364e35" /&gt;
          &lt;bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="1.1.0.0" /&gt;
        &lt;/dependentAssembly&gt;
        &lt;dependentAssembly&gt;
          &lt;assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" /&gt;
          &lt;bindingRedirect oldVersion="0.0.0.0-1.6.5135.21930" newVersion="1.6.5135.21930" /&gt;
        &lt;/dependentAssembly&gt;
        &lt;dependentAssembly&gt;
          &lt;assemblyIdentity name="Antlr3.Runtime" publicKeyToken="eb42632606e9261f" culture="neutral" /&gt;
          &lt;bindingRedirect oldVersion="0.0.0.0-3.5.0.2" newVersion="3.5.0.2" /&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="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.Mvc" publicKeyToken="31bf3856ad364e35" /&gt;
          &lt;bindingRedirect oldVersion="1.0.0.0-5.2.3.0" newVersion="5.2.3.0" /&gt;
        &lt;/dependentAssembly&gt;
      &lt;/assemblyBinding&gt;
    &lt;/runtime&gt;
  
  &lt;/configuration&gt;
  </code></pre>