Exception details
System.TypeLoadException
HResult=0x80131522
Message=Method 'PopulateDebugInfo' in type 'Npgsql.EntityFrameworkCore.PostgreSQL.Infrastructure.Internal.NpgsqlOptionsExtension' from assembly 'Npgsql.EntityFrameworkCore.PostgreSQL, Version=3.0.0.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7' does not have an implementation.
Source=Npgsql.EntityFrameworkCore.PostgreSQL
StackTrace:
at Microsoft.EntityFrameworkCore.NpgsqlDbContextOptionsExtensions.UseNpgsql(DbContextOptionsBuilder optionsBuilder, String connectionString, Action`1 npgsqlOptionsAction)
at ...OnConfiguring(DbContextOptionsBuilder optionsBuilder)
at Microsoft.EntityFrameworkCore.DbContext.get_InternalServiceProvider()
at Microsoft.EntityFrameworkCore.DbContext.get_DbContextDependencies()
at Microsoft.EntityFrameworkCore.DbContext.Set[TEntity]()
(further StackTrace is omitted)
Environment
Microsoft.EntityFrameworkCore 3.0.0-preview.19074.3
Npgsql.EntityFrameworkCore.PostgreSQL 3.0.0-ci.1451
@CumpsD There is a prelease package that solved that issue for me.
After the upgrade I couldn’t connect to my old database. Turns out the PostgreSQL option “standard_conforming_strings” has to be “on” or Npgsql refuses to connect. Since PostgreSQL 9.1 “on” is the default value but apparently in our internal database this was manually turned off.
The following statement solves the issue:
It should also be possible to use Npgsql.EntityFrameworkCore.PostgreSQL 5.0.0-rc2 with the final EF Core 5.0.0 (though I haven’t tested). The final 5.0.0 release of Npgsql should come in a couple days.
@roji wrote
… but being an impatient person (and being blocked by the fact that even current MyGet unstable packages don’t work with preview2) I went ahead and tried what it needs to create 3.0.0-preview2 compatibility. It turned out that the necessary changes are minimal and as I assume that they’ll be needed for preview3 compatibility anyways, I’ll file a PR.
Awesome, that means it’s just a dependency conflict. Keep an eye out for our next preview release, that’ll have an updated EF Core dependency.