question

Mustafa-0473 avatar image
0 Votes"
Mustafa-0473 asked ZhiLv-MSFT commented

Scaffolding not work

111557-img-20210704-181015.jpgI updated all the references, but it still didn't work


dotnet-runtimedotnet-aspnet-core-mvcdotnet-standard
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @Mustafa-0473,

The error message means that Microsoft.EntityFrameworkCore.SqlServer.Query.Internal.SqlServerSqlTranslatingExpressionVisitorFactory type has a mention of Create method in your code/library, but it is unable to find it as there is a wrong version's reference of the nuget package in which Create method is not present.

Please note that all the following packages should be of same version:

  • Microsoft.EntityFrameworkCore.Tools

  • Microsoft.EntityFrameworkCore

  • Microsoft.AspNetCore.Identity.EntityFrameworkCore

  • Microsoft.EntityFrameworkCore.Design

  • Microsoft.EntityFrameworkCore.SqlServer

From the image, all of these should be 3.1.15.0 version.

If still not working, you could check out this solution.

Besides, you could also tell us your application version, Visual Studio version, post the .csproj file content and post the related code to reproduce the problem.

0 Votes 0 ·
SajjadRajaee-5042 avatar image
0 Votes"
SajjadRajaee-5042 answered SajjadRajaee-5042 published

Did you installed EntityFramework.Tools?
it contain scaffolding.
Install-Package Microsoft.EntityFrameworkCore.Tools -Version 5.0.7

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

karenpayneoregon avatar image
0 Votes"
karenpayneoregon answered

Consider using EF Power Tools which is a Visual Studio extension which allows reverse engineering by right clicking on a project.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.