Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'Method 'Create' in type - EntityFreamwork 5.0 #1569

Closed
dikmenonur opened this issue Nov 10, 2020 · 5 comments
Closed

'Method 'Create' in type - EntityFreamwork 5.0 #1569

dikmenonur opened this issue Nov 10, 2020 · 5 comments

Comments

@dikmenonur
Copy link

dikmenonur commented Nov 10, 2020

I use EntityFramework in my project and I also use PostgreSQL.
I updaated EFCore 5.0 I did
After doing Microsoft.EntityFrameworkCore.Relational Version : 5.0, I got the following error.

My project .csproj

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>netcoreapp3.1</TargetFramework>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.0" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.Proxies" Version="5.0.0" />
    <PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="5.0.0" />
    <PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="5.0.0" />
    <PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
    <PackageReference Include="Npgsql" Version="4.1.5" />
    <PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="3.1.4" />
  </ItemGroup>

  <ItemGroup>
    <ProjectReference Include="..\Spark.External.Manager\Spark.External.Manager.csproj" />
    <ProjectReference Include="..\Sparks.External.Core\Spark.External.Core.csproj" />
  </ItemGroup>

</Project>

`System.TypeLoadException: 'Method 'Create' in type 'Npgsql.EntityFrameworkCore.PostgreSQL.Query.Internal.NpgsqlSqlTranslatingExpressionVisitorFactory' from assembly 'Npgsql.EntityFrameworkCore.PostgreSQL, Version=3.1.4.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7' does not have an implementation.'

System.TypeLoadException
HResult=0x80131522
Message=Method 'Create' in type 'Npgsql.EntityFrameworkCore.PostgreSQL.Query.Internal.NpgsqlSqlTranslatingExpressionVisitorFactory' from assembly 'Npgsql.EntityFrameworkCore.PostgreSQL, Version=3.1.4.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7' does not have an implementation.
Source=Npgsql.EntityFrameworkCore.PostgreSQL
StackTrace:
at Microsoft.Extensions.DependencyInjection.NpgsqlServiceCollectionExtensions.AddEntityFrameworkNpgsql(IServiceCollection serviceCollection)
at Npgsql.EntityFrameworkCore.PostgreSQL.Infrastructure.Internal.NpgsqlOptionsExtension.ApplyServices(IServiceCollection services)
at Microsoft.EntityFrameworkCore.Internal.ServiceProviderCache.ApplyServices(IDbContextOptions options, ServiceCollection services)
at Microsoft.EntityFrameworkCore.Internal.ServiceProviderCache.<>c__DisplayClass4_0.g__BuildServiceProvider|3()
at Microsoft.EntityFrameworkCore.Internal.ServiceProviderCache.<>c__DisplayClass4_0.b__2(Int64 k)
at System.Collections.Concurrent.ConcurrentDictionary2.GetOrAdd(TKey key, Func2 valueFactory)
at Microsoft.EntityFrameworkCore.Internal.ServiceProviderCache.GetOrAdd(IDbContextOptions options, Boolean providerRequired)
at Microsoft.EntityFrameworkCore.DbContext..ctor(DbContextOptions options)
at Spark.External.Core.DataSource.PostgresDbContext..ctor(DbContextOptions1 options) in D:\Git\Sparks.External\Sparks.External.Core\DataSource\PostgresDbContext.cs:line 12

@YohDeadfall
Copy link
Contributor

You're mixing EF 3.1.4 and 5.0, so the error is expected. Please wait for the provider and the driver releases from us, it may take some time, but may happen today.

@dikmenonur
Copy link
Author

thank you for information

@CumpsD
Copy link

CumpsD commented Nov 10, 2020

🤞 looking forward to this too :)

[21:57:38 FTL] Host terminated unexpectedly
System.TypeLoadException: Method 'Create' in type 'Npgsql.EntityFrameworkCore.PostgreSQL.Query.Internal.NpgsqlSqlTranslatingExpressionVisitorFactory' from assembly 'Npgsql.EntityFrameworkCore.PostgreSQL, Version=3.1.4.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7' does not have an implementation.

@JulioPablo
Copy link

Any updates on this?

@vonzshik
Copy link
Contributor

vonzshik commented Feb 9, 2021

@JulioPablo EntityFrameworkCore.Postgresql 5.0 has been released on 15 of November.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants