Hi I recently updated my solution to version 14.2.1 of MVC JQuery. Everything is working fin . But when I trytop add a newfieldd in the DB using migratio . I got an error.
Add-Migration AddedImagesJson Method 'Identifier' in type 'Microsoft.EntityFrameworkCore.Design.Internal.CSharpHelper' from assembly 'Microsoft.EntityFrameworkCore.Design, Version=8.0.11.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' does not have an implementation.
Upon investigation, I have noticed that in the latest code Microsoft.EntityFrameworkCore.Design was removed from web.mvc project
- <PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="9.0.2"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> </PackageReference>*
I included this package again in the web.mvc project, and it started working again.
- <PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="9.0.5"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> </PackageReference>*
I have also noticed a version mismatch for this package in different projects. May be not a major issue.
Another thing is, following variable has to be protected, not private.
protected readonly ILocalizationSource _localizationSource = localizationManager.GetSource(BookingsHiveConsts.LocalizationSourceName);
I just want to share my findings. It is not a support ticket. You can close it once you've reviewed it.
1 Answer(s)
-
0
Hi @Prasanthtp
This issue occurs because the HealthChecks package uses an older version of the
Microsoft.EntityFrameworkCore.Designpackage. When performing migration operations, you should select the.*EntityFrameworkCoreproject as the Default Project in the Package Manager Console and also set it as the Startup Project.Another option is to install the
Microsoft.EntityFrameworkCore.Designpackage at the top level of the web project you are using.If you have any further questions, please don’t hesitate to contact us.
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image)

