Efcore.pg: Release 2.0.0-preview2

Created on 30 Jun 2017  路  9Comments  路  Source: npgsql/efcore.pg

When upgrading a Core 2 Preview 1 application to Core 2 Preview 2 we started experiencing this exception using the PG lib. This occurs on both Windows and Linux.

Message:

System.TypeLoadException: System.TypeLoadException: Could not load type 'Microsoft.EntityFrameworkCore.Metadata.IRelationalAnnotationProvider' from assembly 'Microsoft.EntityFrameworkCore.Relational, Version=2.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'

StackTrace:

Microsoft.Extensions.DependencyInjection.NpgsqlEntityFrameworkServicesBuilderExtensions.AddEntityFrameworkNpgsql(IServiceCollection serviceCollection)
   at Microsoft.EntityFrameworkCore.Infrastructure.Internal.NpgsqlOptionsExtension.ApplyServices(IServiceCollection services)
   at Microsoft.EntityFrameworkCore.Internal.ServiceProviderCache.ApplyServices(IDbContextOptions options, ServiceCollection services)
   at Microsoft.EntityFrameworkCore.Internal.ServiceProviderCache.<>c__DisplayClass4_0.<GetOrAdd>b__2(Int64 k)
   at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
   at Microsoft.EntityFrameworkCore.DbContext.InitializeServices()
   at Microsoft.EntityFrameworkCore.DbContext.get_InternalServiceProvider()
   at Microsoft.EntityFrameworkCore.DbContext.get_DbContextDependencies()
   at Microsoft.EntityFrameworkCore.DbContext.EntryWithoutDetectChanges[TEntity](TEntity entity)
   at Microsoft.EntityFrameworkCore.DbContext.SetEntityState[TEntity](TEntity entity, EntityState entityState)
... 

Most helpful comment

Thank you @roji for the work. All our unit tests are passing on this library on preview 2.

All 9 comments

Npgsql EF Core version 2.0.0-preview2 hasn't been released yet, and it's not possible to use preview1 with EF Core preview2 (they introduced significant API changes). You'll have to wait until a 2.0.0-preview2 version of Npgsql.EntityFrameworkCore.PostgreSQL released (probably very soon).

I'll post back here once this is released.

It is already released

@MathiasKowoll no, it's not. EF Core 2.0.0-preview2 has been released, but not the Npgsql provider. It should be out in the next hour or two.

2.0.0-preview2 has been pushed to nuget, please let me know of any issues you come across.

@roji I menat that it was release about EF ;) will test asap

I get this error while creating migrations:

image

@SleepyDeb I fix that error upgrading npgsql to 3.2.4.1

@SleepyDeb for errors about NpgsqlDesignTimeServices, please use version 2.0.0-preview2-final where it is fixed.

Thank you @roji for the work. All our unit tests are passing on this library on preview 2.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fernandolguevara picture fernandolguevara  路  3Comments

austindrenski picture austindrenski  路  5Comments

guoyongchang picture guoyongchang  路  3Comments

mrclayman picture mrclayman  路  3Comments

rakeshkotha picture rakeshkotha  路  3Comments