title: Could not load file or assembly Microsoft.Owin.Security.OAuth, Version=2.0.0.0
body: <p>I have a MVC project with OAuth authentication, every time I try to debug the project i get a FileLoadException upon configuring the IAppBuilder. I have installed version 3.0.1 of Microsoft.Owin.Security.Oauth using the PMC but I guess somewhere still lies a reference to an older version of the package because...</p>
  
  <p>This is the exception:</p>
  
  <p><a href="https://i.stack.imgur.com/3PqoX.png" rel="noreferrer"><img src="https://i.stack.imgur.com/3PqoX.png" alt="enter image description here"></a></p>
  
  <p>This is where it is thrown:</p>
  
  <pre><code>public partial class Startup
  {
      public void Configuration(IAppBuilder app)
      {
          ConfigureAuth(app); //Exception is thrown here
      }
  }
  </code></pre>
  
  <p>This is my packages.config:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;packages&gt;
    &lt;package id="Antlr" version="3.4.1.9004" targetFramework="net45" /&gt;
    &lt;package id="CommonServiceLocator" version="1.3" targetFramework="net45" /&gt;
    &lt;package id="EntityFramework" version="6.0.0" targetFramework="net45" /&gt;
    &lt;package id="jQuery" version="1.10.2" targetFramework="net45" /&gt;
    &lt;package id="jQuery.Validation" version="1.11.1" targetFramework="net45" /&gt;
    &lt;package id="log4net" version="2.0.3" targetFramework="net45" /&gt;
    &lt;package id="Microsoft.AspNet.Identity.Core" version="1.0.0" targetFramework="net45" /&gt;
    &lt;package id="Microsoft.AspNet.Identity.EntityFramework" version="1.0.0" targetFramework="net45" /&gt;
    &lt;package id="Microsoft.AspNet.Identity.Owin" version="1.0.0" targetFramework="net45" /&gt;
    &lt;package id="Microsoft.AspNet.Mvc" version="5.0.0" targetFramework="net45" /&gt;
    &lt;package id="Microsoft.AspNet.Razor" version="3.2.3" targetFramework="net45" /&gt;
    &lt;package id="Microsoft.AspNet.Web.Optimization" version="1.1.1" targetFramework="net45" /&gt;
    &lt;package id="Microsoft.AspNet.WebApi" version="5.0.0" targetFramework="net45" /&gt;
    &lt;package id="Microsoft.AspNet.WebApi.Client" version="5.2.3" targetFramework="net45" /&gt;
    &lt;package id="Microsoft.AspNet.WebApi.Core" version="5.2.3" targetFramework="net45" /&gt;
    &lt;package id="Microsoft.AspNet.WebApi.HelpPage" version="5.0.0" targetFramework="net45" /&gt;
    &lt;package id="Microsoft.AspNet.WebApi.Owin" version="5.0.0" targetFramework="net45" /&gt;
    &lt;package id="Microsoft.AspNet.WebApi.WebHost" version="5.0.0" targetFramework="net45" /&gt;
    &lt;package id="Microsoft.AspNet.WebPages" version="3.2.3" targetFramework="net45" /&gt;
    &lt;package id="Microsoft.jQuery.Unobtrusive.Validation" version="3.0.0" targetFramework="net45" /&gt;
    &lt;package id="Microsoft.Owin" version="3.0.1" targetFramework="net45" /&gt;
    &lt;package id="Microsoft.Owin.Host.SystemWeb" version="3.0.1" targetFramework="net45" /&gt;
    &lt;package id="Microsoft.Owin.Security" version="3.0.1" targetFramework="net45" /&gt;
    &lt;package id="Microsoft.Owin.Security.Cookies" version="3.0.1" targetFramework="net45" /&gt;
    &lt;package id="Microsoft.Owin.Security.Google" version="3.0.1" targetFramework="net45" /&gt;
    &lt;package id="Microsoft.Owin.Security.OAuth" version="3.0.1" targetFramework="net45" /&gt;
    &lt;package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net45" /&gt;
    &lt;package id="Modernizr" version="2.6.2" targetFramework="net45" /&gt;
    &lt;package id="Newtonsoft.Json" version="7.0.1" targetFramework="net45" /&gt;
    &lt;package id="Owin" version="1.0" targetFramework="net45" /&gt;
    &lt;package id="Unity" version="3.5.1404.0" targetFramework="net45" /&gt;
    &lt;package id="WebGrease" version="1.6.0" targetFramework="net45" /&gt;
  &lt;/packages&gt;
  </code></pre>
  
  <p>I tried adding <a href="https://stackoverflow.com/a/24868287/1376691">binding redirect</a> as such:</p>
  
  <pre><code>&lt;dependentAssembly&gt;
      &lt;assemblyIdentity name="Microsoft.Owin.Security.OAuth" PublicKeyToken="31bf3856ad364e35"/&gt;
      &lt;bindingRedirect oldVersion="1.0.0.0-3.0.1.0" newVersion="3.0.1.0"/&gt;
  &lt;/dependentAssembly&gt; 
  </code></pre>
  
  <p><em>Can´t understand why this doesn´t work, does Visual Studio make a difference between 3.0.1 and 3.0.1.0?</em></p>
  
  <p>I tried removing obj and bin folders, cleaning projects and rebuilding them.</p>
  
  <p>I tried deleting all nuget packages and restoring them.</p>
  
  <p>I tried reinstalling all Owin packages.</p>
  
  <p>I´ve used Agent Ransack to search my entire source directory for any file containing <em>Microsoft.Owin.Security.OAuth</em> but found no references to version 2.0.0.0 or any other version besides the correct 3.0.1.0.</p>
  
  <p>I´m stuck, any ideas?</p>