AspNetCoreLocalization icon indicating copy to clipboard operation
AspNetCoreLocalization copied to clipboard

EF6 missmatch version with EF5 throws HasAlternateKey method does not exist

Open nehio opened this issue 3 years ago • 4 comments

Hi,

We were trying to update our app to net6.0 and noticed that due to our app having EF 6.0 and your package beeing on 5.0 it causes an error to be thrown on the SqlStringLocalizerFactory.cs line 113.

As i understand it, simply having the packages to the same version should fix this issue. Could you provide a release for net6.0 ?

Thank you in advance

nehio avatar Feb 04 '22 17:02 nehio

@nehio sounds good, I'll do an update

damienbod avatar Feb 04 '22 18:02 damienbod

Updating our app to net6.0, we also get an exception on the HasAlternateKey, but on the OnModelCreating method:

System.MissingMethodException: Method not found: 'Microsoft.EntityFrameworkCore.Metadata.Builders.KeyBuilder Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder`1.HasAlternateKey(System.Linq.Expressions.Expression`1<System.Func\`2<!0,System.Object>>)'. at Localization.SqlLocalizer.DbStringLocalizer.LocalizationModelContext.OnModelCreating(ModelBuilder builder)

daniel-jann avatar Mar 08 '22 08:03 daniel-jann

I will test and release with .NET 6 and the latest EF Core

Thanks for reporting

damienbod avatar Mar 15 '22 19:03 damienbod

HI there ! Any news on a timeline for an update for .net 6.0 ? Thank you in advance.

nehio avatar Jun 16 '22 13:06 nehio