title: TypeLoadException using PostgreSQL with ASP.NET Core Identity
body: <p>I am attempting to use PostgreSQL as the data store for user authentication in an ASP.NET Core 1.0 Visual Studio 2015 project following installation of VS2015 Update 3 and the Core 1.0 release.</p>
  
  <p>Steps:</p>
  
  <ol>
  <li><p>Create new "ASP.NET Core Web Application (.NET Framework)" project.</p></li>
  <li><p>Add NuGet packages "Npgsql" v3.1.4 and "Npgsql.EntityFrameworkCore.PostgreSQL" v1.0.0-rc2-release1</p></li>
  <li><p>Modify ConfigureServices() in Startup.cs as follows:</p>
  
  <pre><code>public void ConfigureServices(IServiceCollection services)
  {
      // Add framework services.
      services.AddEntityFrameworkNpgsql()
          .AddDbContext&lt;ApplicationDbContext&gt;(options =&gt;
          options.UseNpgsql(Configuration.GetConnectionString("DefaultConnection")));
  
      services.AddIdentity&lt;ApplicationUser, IdentityRole&gt;()
          .AddEntityFrameworkStores&lt;ApplicationDbContext&gt;()
          .AddDefaultTokenProviders();
  
      services.AddMvc();
  
      // Add application services.
      services.AddTransient&lt;IEmailSender, AuthMessageSender&gt;();
      services.AddTransient&lt;ISmsSender, AuthMessageSender&gt;();
  }
  </code></pre></li>
  <li><p>Run</p></li>
  <li><p>Exception thrown on call to AddDbContext():</p></li>
  </ol>
  
  <blockquote>
    <p>An exception of type 'System.TypeLoadException' occurred in MyApp.exe
    but was not handled in user code</p>
    
    <p>Additional information: Could not load type
    'Microsoft.Extensions.DependencyInjection.Extensions.ServiceCollectionExtensions'
    from assembly 'Microsoft.Extensions.DependencyInjection.Abstractions,
    Version=1.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'.</p>
  </blockquote>
  
  <p>I assume this is a compatibility issue that will soon be addressed in Npgsql.EntityFrameworkCore.PostgreSQL, but wanted to confirm this and determine if a workaround is available.</p>