title: Why is assembly binding redirect not working in my web site?
body: <p>I have a web site project that I run from Visual Studio using the built in development web server. The virtual path of the web site is set to <code>/</code></p>
  
  <p>The web.config contains a runtime element with </p>
  
  <pre><code>&lt;runtime&gt;
    &lt;assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"&gt;
      &lt;dependentAssembly&gt;
        &lt;assemblyIdentity name="CMS.Controls" publicKeyToken="834b12a258f213f9" culture="neutral" /&gt;
        &lt;bindingRedirect oldVersion="4.1.3518.21577" newVersion="4.1.3561.21846" /&gt;
      &lt;/dependentAssembly&gt;
    &lt;/assemblyBinding&gt;
  &lt;/runtime&gt;
  </code></pre>
  
  <p>I have already removed the <code>xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0"</code> attribute from the root <code>configuration</code> element.</p>
  
  <p>Here is the error:</p>
  
  <blockquote>
    <p>Could not load file or assembly
    'CMS.Controls, Version=4.1.3518.21577,
    Culture=neutral,
    PublicKeyToken=834b12a258f213f9' or
    one of its dependencies. The located
    assembly's manifest definition does
    not match the assembly reference.
    (Exception from HRESULT: 0x80131040)</p>
  </blockquote>
  
  <p>Here is the log of the binding:</p>
  
  <pre><code>The operation failed.
  Bind result: hr = 0x80131040. No description available.
  ...
  LOG: DisplayName = CMS.Controls, Version=4.1.3518.21577, Culture=neutral, PublicKeyToken=834b12a258f213f9
   (Fully-specified)
  ...
  LOG: This bind starts in default load context.
  LOG: Using application configuration file: D:\Project\WebSite\web.config
  LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v2.0.50727\config\machine.config.
  LOG: Post-policy reference: CMS.Controls, Version=4.1.3518.21577, Culture=neutral, PublicKeyToken=834b12a258f213f9
  ...
  LOG: Assembly Name is: CMS.Controls, Version=4.1.3561.21846, Culture=neutral, PublicKeyToken=834b12a258f213f9
  WRN: Comparing the assembly name resulted in the mismatch: Revision Number
  </code></pre>
  
  <p>Seems to me like it's ignoring my redirect. I've been looking at it for an hour, do I have a typo or something?</p>