Enable-Migrations Exception calling “SetData” with “2” argument(s)

后端 未结 8 1723
小鲜肉
小鲜肉 2020-11-29 09:45

I created a library based on .NET 4.6.2 version.
To the library, I\'ve added the EntityFramework version 6.1.3 package.
I created a model as follow



        
8条回答
  •  渐次进展
    2020-11-29 10:41

    This can happen if you have both Microsoft.EntityFrameworkCore.SqlServer installed alongside an older version of EntityFramework say 6.x

    In Visual Studio, go to Project/Manage Nuget Packages...

    Take a look through the Installed list and if more than one version of EntityFramework is installed, uninstall all older versions, leaving only the latest version.

提交回复
热议问题